Interface LowLevelComponent
-
- All Superinterfaces:
Component,Specializable<LowLevelComponent>
- All Known Subinterfaces:
Button,SelectMenu,TextInput
public interface LowLevelComponent extends Component, Specializable<LowLevelComponent>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.Optional<Button>asButton()Gets the component as a Button if it's of that type.default java.util.Optional<SelectMenu>asSelectMenu()Gets the component as a SelectMenu if it's of that type.default java.util.Optional<TextInput>asTextInput()Gets the component as a TextInput if it's of that type.default booleanisButton()Whether this component is of this type.default booleanisSelectMenu()Whether this component is of this type.default booleanisTextInput()Whether this component is of this type.-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
-
-
-
Method Detail
-
isButton
default boolean isButton()
Whether this component is of this type.- Returns:
- True if it's of that type.
-
asButton
default java.util.Optional<Button> asButton()
Gets the component as a Button if it's of that type.- Returns:
- The Button.
-
isSelectMenu
default boolean isSelectMenu()
Whether this component is of this type.- Returns:
- True if it's of that type.
-
asSelectMenu
default java.util.Optional<SelectMenu> asSelectMenu()
Gets the component as a SelectMenu if it's of that type.- Returns:
- The SelectMenu.
-
isTextInput
default boolean isTextInput()
Whether this component is of this type.- Returns:
- True if it's of that type.
-
asTextInput
default java.util.Optional<TextInput> asTextInput()
Gets the component as a TextInput if it's of that type.- Returns:
- The SelectMenu.
-
-