Interface ModalComponentTree
- All Superinterfaces:
ComponentTree<ModalTopLevelComponentUnion>
- All Known Implementing Classes:
ModalComponentTreeImpl
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 ModalComponentTree
Disables all components which can be disabled, and constructs a new tree from the result.default ModalComponentTree
Enables all components which can be enabled, and constructs a new tree from the result.static ModalComponentTree
of
(Collection<? extends ModalTopLevelComponent> components) Creates aModalComponentTree
from the given top-level modal components.static ModalComponentTree
of
(ModalTopLevelComponent... components) Creates aModalComponentTree
from 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:ComponentTree
Replaces and/or removes components using the providedComponentReplacer
, and construct a new tree from the result.- Specified by:
replace
in interfaceComponentTree<ModalTopLevelComponentUnion>
- 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<ModalTopLevelComponentUnion>
- Returns:
- A new tree with all components enabled/disabled.
-
asDisabled
Description copied from interface:ComponentTree
Disables all components which can be disabled, and constructs a new tree from the result.- Specified by:
asDisabled
in interfaceComponentTree<ModalTopLevelComponentUnion>
- Returns:
- A new tree with all components disabled.
-
asEnabled
Description copied from interface:ComponentTree
Enables all components which can be enabled, and constructs a new tree from the result.- Specified by:
asEnabled
in interfaceComponentTree<ModalTopLevelComponentUnion>
- Returns:
- A new tree with all components enabled.
-
of
@Nonnull static ModalComponentTree of(@Nonnull Collection<? extends ModalTopLevelComponent> components) Creates aModalComponentTree
from the given top-level modal components.- Parameters:
components
- List of components to construct the tree from- Returns:
- A
ModalComponentTree
containing the given components - Throws:
IllegalArgumentException
- Ifnull
is provided or the collection is empty
-
of
Creates aModalComponentTree
from the given top-level modal components.- Parameters:
components
- List of components to construct the tree from- Returns:
- A
ModalComponentTree
containing the given components - Throws:
IllegalArgumentException
- Ifnull
is provided
-