Class TeamImpl

java.lang.Object
com.mewna.catnip.entity.impl.misc.TeamImpl
All Implemented Interfaces:
Entity, Team, HasIcon, HasName, Snowflake, Timestamped, RequiresCatnip

public class TeamImpl extends Object implements Team, RequiresCatnip
Since:
06/24/19.
Author:
Bowser65
  • Constructor Details

    • TeamImpl

      public TeamImpl()
    • TeamImpl

      public TeamImpl(Catnip catnip, long idAsLong, long ownerIdAsLong, String name, String icon, List<TeamMember> members)
  • Method Details

    • catnip

      public void catnip(@Nonnull Catnip catnip)
      Specified by:
      catnip in interface RequiresCatnip
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • iconUrl

      @Nullable public String iconUrl(@Nonnull ImageOptions options)
      Specified by:
      iconUrl in interface HasIcon
      Returns:
      The icon's CDN URL, with the specified options applied. Will be null if HasIcon.icon() is null, except in the case of a User.
    • builder

      public static TeamImpl.TeamImplBuilder builder()
    • catnip

      public Catnip catnip()
      Description copied from interface: Entity
      Returns the catnip instance associated with this entity.
      Specified by:
      catnip in interface Entity
      Returns:
      The catnip instance of this entity.
    • idAsLong

      public long idAsLong()
      Description copied from interface: Snowflake
      The ID of this snowflake, as a long.
      Specified by:
      idAsLong in interface Snowflake
      Returns:
      Long representing the ID.
    • ownerIdAsLong

      public long ownerIdAsLong()
      Description copied from interface: Team
      The ID of the team owner, as a long.
      Specified by:
      ownerIdAsLong in interface Team
      Returns:
      Long representing their ID.
    • name

      public String name()
      Specified by:
      name in interface HasName
    • icon

      public String icon()
      Specified by:
      icon in interface HasIcon
      Returns:
      The icon's hash. May be null, in cases like a user not setting an avatar, no guild icon, ...
    • members

      public List<TeamMember> members()
      Specified by:
      members in interface Team
      Returns:
      The members of the team
    • idAsLong

      public TeamImpl idAsLong(long idAsLong)
      Returns:
      this.
    • ownerIdAsLong

      public TeamImpl ownerIdAsLong(long ownerIdAsLong)
      Returns:
      this.
    • name

      public TeamImpl name(String name)
      Returns:
      this.
    • icon

      public TeamImpl icon(String icon)
      Returns:
      this.
    • members

      public TeamImpl members(List<TeamMember> members)
      Returns:
      this.