Class SeparatorImpl
java.lang.Object
net.dv8tion.jda.internal.components.AbstractComponentImpl
net.dv8tion.jda.internal.components.separator.SeparatorImpl
- All Implemented Interfaces:
Component
,ContainerChildComponent
,ContainerChildComponentUnion
,IComponentUnion
,MessageTopLevelComponent
,MessageTopLevelComponentUnion
,Separator
,SerializableData
public class SeparatorImpl
extends AbstractComponentImpl
implements Separator, MessageTopLevelComponentUnion, ContainerChildComponentUnion
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.Component
Component.Type
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.separator.Separator
Separator.Spacing
-
Constructor Summary
ConstructorsConstructorDescriptionSeparatorImpl
(Separator.Spacing spacing, boolean isDivider) SeparatorImpl
(DataObject obj) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The spacing of this separator.getType()
The type of component.int
The unique, numeric identifier of this component.int
hashCode()
boolean
Whether this separator is visible or not.toData()
SerializedDataObject
for this object.toString()
withDivider
(boolean divider) Creates a newSeparator
with the provided divider status.withSpacing
(Separator.Spacing spacing) Creates a newSeparator
with the provided spacing.withUniqueId
(int uniqueId) Creates a new component with the provided numeric ID.Methods inherited from class net.dv8tion.jda.internal.components.AbstractComponentImpl
asActionRow, asButton, asContainer, asEntitySelectMenu, asFileDisplay, asMediaGallery, asSection, asSeparator, asStringSelectMenu, asTextDisplay, asTextInput, asThumbnail
Methods inherited from interface net.dv8tion.jda.api.components.Component
isMessageCompatible, isModalCompatible
Methods inherited from interface net.dv8tion.jda.api.components.container.ContainerChildComponentUnion
asActionRow, asFileDisplay, asMediaGallery, asSection, asSeparator, asTextDisplay
Methods inherited from interface net.dv8tion.jda.api.components.IComponentUnion
isUnknownComponent
Methods inherited from interface net.dv8tion.jda.api.components.MessageTopLevelComponentUnion
asActionRow, asContainer, asFileDisplay, asMediaGallery, asSection, asSeparator, asTextDisplay
-
Constructor Details
-
SeparatorImpl
-
SeparatorImpl
-
-
Method Details
-
getType
Description copied from interface:Component
The type of component.- Specified by:
getType
in interfaceComponent
- Returns:
Component.Type
-
withUniqueId
Description copied from interface:Component
Creates a new component with the provided numeric ID.
If no ID is set, Discord will generate IDs incrementally starting from 1 and will not use existing IDs from the same message/modal.- Specified by:
withUniqueId
in interfaceComponent
- Specified by:
withUniqueId
in interfaceContainerChildComponent
- Specified by:
withUniqueId
in interfaceContainerChildComponentUnion
- Specified by:
withUniqueId
in interfaceIComponentUnion
- Specified by:
withUniqueId
in interfaceMessageTopLevelComponent
- Specified by:
withUniqueId
in interfaceMessageTopLevelComponentUnion
- Specified by:
withUniqueId
in interfaceSeparator
- Parameters:
uniqueId
- The new ID; must be higher or equal to 1- Returns:
- The new component
-
withDivider
Description copied from interface:Separator
Creates a newSeparator
with the provided divider status.- Specified by:
withDivider
in interfaceSeparator
- Parameters:
divider
- The new divider status,true
to make it visible,false
is invisible- Returns:
- The new
Separator
-
withSpacing
Description copied from interface:Separator
Creates a newSeparator
with the provided spacing.- Specified by:
withSpacing
in interfaceSeparator
- Parameters:
spacing
- The new spacing- Returns:
- The new
Separator
-
getUniqueId
public int getUniqueId()Description copied from interface:Component
The unique, numeric identifier of this component.
Can be set manually or automatically assigned by Discord (starting from1
). If it has not been assigned yet, this will return-1
.Note: Older messages may return
0
.- Specified by:
getUniqueId
in interfaceComponent
- Returns:
- The unique identifier of this component, or
-1
if not assigned yet, or0
on older messages
-
isDivider
public boolean isDivider()Description copied from interface:Separator
Whether this separator is visible or not. -
getSpacing
Description copied from interface:Separator
The spacing of this separator.- Specified by:
getSpacing
in interfaceSeparator
- Returns:
- The spacing
-
toData
Description copied from interface:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Returns:
DataObject
-
equals
-
hashCode
public int hashCode() -
toString
-