Package org.javacord.core.entity.emoji
Class CustomEmojiImpl
- java.lang.Object
-
- org.javacord.core.entity.emoji.CustomEmojiImpl
-
- All Implemented Interfaces:
Formattable
,DiscordEntity
,CustomEmoji
,Emoji
,Mentionable
,Nameable
,Updatable<Emoji>
,UpdatableFromCache<Emoji>
,Specializable<Emoji>
- Direct Known Subclasses:
KnownCustomEmojiImpl
public class CustomEmojiImpl extends Object implements CustomEmoji
The implementation ofCustomEmoji
.
-
-
Constructor Summary
Constructors Constructor Description CustomEmojiImpl(DiscordApiImpl api, long id, String name, boolean animated)
Creates a new custom emoji.CustomEmojiImpl(DiscordApiImpl api, com.fasterxml.jackson.databind.JsonNode data)
Creates a new custom emoji.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
DiscordApi
getApi()
long
getId()
Icon
getImage()
String
getName()
int
hashCode()
boolean
isAnimated()
String
toString()
-
Methods inherited from interface org.javacord.api.entity.emoji.CustomEmoji
asCustomEmoji, asKnownCustomEmoji, asUnicodeEmoji, getCurrentCachedInstance, getMentionTag
-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getCreationTimestamp, getCreationTimestamp, getIdAsString
-
Methods inherited from interface org.javacord.api.entity.emoji.Emoji
equalsEmoji, equalsEmoji, isCustomEmoji, isKnownCustomEmoji, isUnicodeEmoji
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
Methods inherited from interface org.javacord.api.entity.UpdatableFromCache
getLatestInstance
-
-
-
-
Field Detail
-
name
protected volatile String name
The name of the emoji.
-
-
Constructor Detail
-
CustomEmojiImpl
public CustomEmojiImpl(DiscordApiImpl api, com.fasterxml.jackson.databind.JsonNode data)
Creates a new custom emoji.- Parameters:
api
- The discord api instance.data
- The json data of the emoji.
-
CustomEmojiImpl
public CustomEmojiImpl(DiscordApiImpl api, long id, String name, boolean animated)
Creates a new custom emoji.- Parameters:
api
- The discord api instance.id
- The id of the emoji.name
- The name of the emoji.animated
- Whether the emoji is animated or not.
-
-
Method Detail
-
getApi
public DiscordApi getApi()
- Specified by:
getApi
in interfaceDiscordEntity
-
getId
public long getId()
- Specified by:
getId
in interfaceDiscordEntity
-
getImage
public Icon getImage()
- Specified by:
getImage
in interfaceCustomEmoji
-
isAnimated
public boolean isAnimated()
- Specified by:
isAnimated
in interfaceEmoji
-
-