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
- Since:
- 9/12/18
- Author:
- natanbc
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.channel.Channel
Channel.ChannelType
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.channel.GuildChannel
GuildChannel.ChannelEditFields
Nested classes/interfaces inherited from interface com.mewna.catnip.entity.partials.Timestamped
Timestamped.TimestampStyle
-
Constructor Summary
ConstructorDescriptionCategoryImpl
(Catnip catnip, long idAsLong, String name, long guildIdAsLong, int position, long parentIdAsLong, List<PermissionOverride> overrides) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
catnip()
Returns the catnip instance associated with this entity.void
boolean
long
The id of the guild this entity is from.guildIdAsLong
(long guildIdAsLong) int
hashCode()
long
idAsLong()
The ID of this snowflake, as a long.idAsLong
(long idAsLong) name()
overrides
(List<PermissionOverride> overrides) long
parentIdAsLong
(long parentIdAsLong) int
position()
position
(int position) toString()
type()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.mewna.catnip.entity.channel.Category
isCategory, isText, isVoice
Methods inherited from interface com.mewna.catnip.entity.channel.Channel
asCategory, asDMChannel, asGroupDMChannel, asGuildChannel, asMessageChannel, asTextChannel, asUserDMChannel, asVoiceChannel, delete, isGuildMessageChannel, isNews, isStore
Methods inherited from interface com.mewna.catnip.entity.channel.GuildChannel
createInvite, createInvite, createInvite, delete, edit, fetchInvites, isDM, isGroupDM, isGuild, isUserDM
Methods inherited from interface com.mewna.catnip.entity.partials.GuildEntity
guild
Methods inherited from interface com.mewna.catnip.entity.partials.HasParentChannel
parentId
Methods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp, id
Methods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
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
- Specified by:
catnip
in interfaceRequiresCatnip
-
hashCode
public int hashCode() -
equals
-
toString
-
builder
-
type
-
catnip
Description copied from interface:Entity
Returns the catnip instance associated with this entity. -
idAsLong
public long idAsLong()Description copied from interface:Snowflake
The ID of this snowflake, as a long. -
name
-
guildIdAsLong
public long guildIdAsLong()Description copied from interface:HasGuild
The id of the guild this entity is from.- Specified by:
guildIdAsLong
in interfaceHasGuild
- Returns:
- Long representing the guild ID.
-
position
public int position()- Specified by:
position
in interfaceGuildChannel
- Returns:
- The position of the channel.
-
parentIdAsLong
public long parentIdAsLong()- Specified by:
parentIdAsLong
in interfaceHasParentChannel
- Returns:
- The id of the
Category
that is the parent of this channel. A value of0
means no parent.
-
overrides
- Specified by:
overrides
in interfaceGuildChannel
- Returns:
- The permission overrides set on this channel. Will never be
null
, but may be empty.
-
idAsLong
- Returns:
this
.
-
name
- Returns:
this
.
-
guildIdAsLong
- Returns:
this
.
-
position
- Returns:
this
.
-
parentIdAsLong
- Returns:
this
.
-
overrides
- Returns:
this
.
-