Class CategoryImpl

java.lang.Object
com.mewna.catnip.entity.impl.channel.CategoryImpl
All Implemented Interfaces:
Category, Channel, GuildChannel, Entity, GuildEntity, HasGuild, HasName, HasParentChannel, Snowflake, Timestamped, RequiresCatnip

public class CategoryImpl extends Object implements Category, RequiresCatnip
Since:
9/12/18
Author:
natanbc
  • Constructor Details

    • CategoryImpl

      public CategoryImpl()
    • CategoryImpl

      public CategoryImpl(Catnip catnip, long idAsLong, String name, long guildIdAsLong, int position, long parentIdAsLong, List<PermissionOverride> overrides)
  • 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
    • builder

      public static CategoryImpl.CategoryImplBuilder builder()
    • type

      public Channel.ChannelType type()
      Specified by:
      type in interface Channel
      Returns:
      The type of this channel.
    • 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.
    • name

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

      public long guildIdAsLong()
      Description copied from interface: HasGuild
      The id of the guild this entity is from.
      Specified by:
      guildIdAsLong in interface HasGuild
      Returns:
      Long representing the guild ID.
    • position

      public int position()
      Specified by:
      position in interface GuildChannel
      Returns:
      The position of the channel.
    • parentIdAsLong

      public long parentIdAsLong()
      Specified by:
      parentIdAsLong in interface HasParentChannel
      Returns:
      The id of the Category that is the parent of this channel. A value of 0 means no parent.
    • overrides

      public List<PermissionOverride> overrides()
      Specified by:
      overrides in interface GuildChannel
      Returns:
      The permission overrides set on this channel. Will never be null, but may be empty.
    • idAsLong

      public CategoryImpl idAsLong(long idAsLong)
      Returns:
      this.
    • name

      public CategoryImpl name(String name)
      Returns:
      this.
    • guildIdAsLong

      public CategoryImpl guildIdAsLong(long guildIdAsLong)
      Returns:
      this.
    • position

      public CategoryImpl position(int position)
      Returns:
      this.
    • parentIdAsLong

      public CategoryImpl parentIdAsLong(long parentIdAsLong)
      Returns:
      this.
    • overrides

      public CategoryImpl overrides(List<PermissionOverride> overrides)
      Returns:
      this.