Class ActionRowImpl
java.lang.Object
net.dv8tion.jda.internal.components.AbstractComponentImpl
net.dv8tion.jda.internal.components.actionrow.ActionRowImpl
- All Implemented Interfaces:
ActionRow
,IDisableable
,Component
,ContainerChildComponent
,ContainerChildComponentUnion
,IComponentUnion
,MessageTopLevelComponent
,MessageTopLevelComponentUnion
,IReplaceable
,ModalTopLevelComponent
,ModalTopLevelComponentUnion
,SerializableData
public class ActionRowImpl
extends AbstractComponentImpl
implements ActionRow, MessageTopLevelComponentUnion, ModalTopLevelComponentUnion, ContainerChildComponentUnion
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.Component
Component.Type
-
Constructor Summary
ConstructorsConstructorDescriptionActionRowImpl
(Collection<ActionRowChildComponentUnion> components, int uniqueId) ActionRowImpl
(DataObject data) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns an unmodifiable list of the components contained in this action row.getType()
The type of component.int
The unique, numeric identifier of this component.int
hashCode()
static ActionRow
of
(Collection<? extends ActionRowChildComponent> components) partitionOf
(Collection<? extends ActionRowChildComponent> components) replace
(ComponentReplacer replacer) Replaces and/or removes children components using the providedComponentReplacer
, and construct a new component from the result.toData()
SerializedDataObject
for this object.toString()
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.actionrow.ActionRow
asDisabled, asEnabled, getActionComponents, getButtons, isDisabled, isEnabled, isMessageCompatible, isModalCompatible, withDisabled
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
Methods inherited from interface net.dv8tion.jda.api.interactions.modals.ModalTopLevelComponentUnion
asActionRow
-
Constructor Details
-
ActionRowImpl
-
ActionRowImpl
-
-
Method Details
-
of
@Nonnull public static ActionRow of(@Nonnull Collection<? extends ActionRowChildComponent> components) -
partitionOf
@Nonnull public static List<ActionRow> partitionOf(@Nonnull Collection<? extends ActionRowChildComponent> components) -
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
-
getComponents
Description copied from interface:ActionRow
Returns an unmodifiable list of the components contained in this action row.- Specified by:
getComponents
in interfaceActionRow
- Returns:
- Unmodifiable
List
ofActionRowChildComponentUnion
contained in this action row
-
replace
Description copied from interface:IReplaceable
Replaces and/or removes children components using the providedComponentReplacer
, and construct a new component from the result.- Specified by:
replace
in interfaceActionRow
- Specified by:
replace
in interfaceIReplaceable
- Parameters:
replacer
- TheComponentReplacer
to apply- Returns:
- The new, updated component
- See Also:
-
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 interfaceActionRow
- Specified by:
withUniqueId
in interfaceComponent
- Specified by:
withUniqueId
in interfaceContainerChildComponent
- Specified by:
withUniqueId
in interfaceContainerChildComponentUnion
- Specified by:
withUniqueId
in interfaceIComponentUnion
- Specified by:
withUniqueId
in interfaceIDisableable
- Specified by:
withUniqueId
in interfaceMessageTopLevelComponent
- Specified by:
withUniqueId
in interfaceMessageTopLevelComponentUnion
- Specified by:
withUniqueId
in interfaceModalTopLevelComponent
- Specified by:
withUniqueId
in interfaceModalTopLevelComponentUnion
- Parameters:
uniqueId
- The new ID; must be higher or equal to 1- Returns:
- The new component
-
getType
Description copied from interface:Component
The type of component.- Specified by:
getType
in interfaceComponent
- Returns:
Component.Type
-
toData
Description copied from interface:SerializableData
SerializedDataObject
for this object.- Specified by:
toData
in interfaceSerializableData
- Returns:
DataObject
-
toString
-
hashCode
public int hashCode() -
equals
-