Class MessageComponentTreeImpl
java.lang.Object
net.dv8tion.jda.internal.components.tree.AbstractComponentTree<MessageTopLevelComponentUnion>
net.dv8tion.jda.internal.components.tree.MessageComponentTreeImpl
- All Implemented Interfaces:
ComponentTree<MessageTopLevelComponentUnion>
,MessageComponentTree
public class MessageComponentTreeImpl
extends AbstractComponentTree<MessageTopLevelComponentUnion>
implements MessageComponentTree
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.tree.ComponentTree
ComponentTree.Type
-
Method Summary
Modifier and TypeMethodDescriptiongetType()
Returns the type of this component tree.static MessageComponentTree
of
(Collection<? extends MessageTopLevelComponent> components) replace
(ComponentReplacer replacer) Replaces and/or removes components using the providedComponentReplacer
, and construct a new tree from the result.withDisabled
(boolean disabled) Enables or disables all components which can be enabled/disabled, and constructs a new tree from the result.Methods inherited from class net.dv8tion.jda.internal.components.tree.AbstractComponentTree
getComponents
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.components.tree.ComponentTree
find, findAll, findAll, getComponents
Methods inherited from interface net.dv8tion.jda.api.components.tree.MessageComponentTree
asDisabled, asEnabled
-
Method Details
-
of
@Nonnull public static MessageComponentTree of(@Nonnull Collection<? extends MessageTopLevelComponent> components) -
getType
Description copied from interface:ComponentTree
Returns the type of this component tree.- Specified by:
getType
in interfaceComponentTree<MessageTopLevelComponentUnion>
- Returns:
- The type of this component tree
-
replace
Description copied from interface:ComponentTree
Replaces and/or removes components using the providedComponentReplacer
, and construct a new tree from the result.- Specified by:
replace
in interfaceComponentTree<MessageTopLevelComponentUnion>
- Specified by:
replace
in interfaceMessageComponentTree
- Parameters:
replacer
- TheComponentReplacer
to apply- Returns:
- A new tree with the new components
- See Also:
-
withDisabled
Description copied from interface:ComponentTree
Enables or disables all components which can be enabled/disabled, and constructs a new tree from the result.- Specified by:
withDisabled
in interfaceComponentTree<MessageTopLevelComponentUnion>
- Specified by:
withDisabled
in interfaceMessageComponentTree
- Overrides:
withDisabled
in classAbstractComponentTree<MessageTopLevelComponentUnion>
- Returns:
- A new tree with all components enabled/disabled.
-