Interface ModalComponentTree
- All Superinterfaces:
ComponentTree<ModalTopLevelComponentUnion>
Specialization of
ComponentTree for top-level modal components
Use the static methods to construct a ModalComponentTree.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.components.tree.ComponentTree
ComponentTree.Type -
Method Summary
Modifier and TypeMethodDescriptiondefault ModalComponentTreeDisables all components which can be disabled, and constructs a new tree from the result.default ModalComponentTreeEnables all components which can be enabled, and constructs a new tree from the result.static ModalComponentTreeof(Collection<? extends ModalTopLevelComponent> components) Creates aModalComponentTreefrom the given top-level modal components.static ModalComponentTreeof(ModalTopLevelComponent... components) Creates aModalComponentTreefrom the given top-level modal 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 interface net.dv8tion.jda.api.components.tree.ComponentTree
find, findAll, findAll, getComponents, getType
-
Method Details
-
replace
Description copied from interface:ComponentTreeReplaces and/or removes components using the providedComponentReplacer, and construct a new tree from the result.- Specified by:
replacein interfaceComponentTree<ModalTopLevelComponentUnion>- Parameters:
replacer- TheComponentReplacerto apply- Returns:
- A new tree with the new components
- See Also:
-
withDisabled
Description copied from interface:ComponentTreeEnables or disables all components which can be enabled/disabled, and constructs a new tree from the result.- Specified by:
withDisabledin interfaceComponentTree<ModalTopLevelComponentUnion>- Returns:
- A new tree with all components enabled/disabled.
-
asDisabled
Description copied from interface:ComponentTreeDisables all components which can be disabled, and constructs a new tree from the result.- Specified by:
asDisabledin interfaceComponentTree<ModalTopLevelComponentUnion>- Returns:
- A new tree with all components disabled.
-
asEnabled
Description copied from interface:ComponentTreeEnables all components which can be enabled, and constructs a new tree from the result.- Specified by:
asEnabledin interfaceComponentTree<ModalTopLevelComponentUnion>- Returns:
- A new tree with all components enabled.
-
of
@Nonnull static ModalComponentTree of(@Nonnull Collection<? extends ModalTopLevelComponent> components) Creates aModalComponentTreefrom the given top-level modal components.- Parameters:
components- List of components to construct the tree from- Returns:
- A
ModalComponentTreecontaining the given components - Throws:
IllegalArgumentException- Ifnullis provided or the collection is empty
-
of
Creates aModalComponentTreefrom the given top-level modal components.- Parameters:
components- List of components to construct the tree from- Returns:
- A
ModalComponentTreecontaining the given components - Throws:
IllegalArgumentException- Ifnullis provided
-