Interface Component
- All Superinterfaces:
ComponentLike
- All Known Subinterfaces:
BuildableComponent<C,,B> ListComponent,NumberComponent,TemporalComponent,TextComponent,TranslatableComponent
A component is an immutable object that represents something that can be displayed to a receiver.
This can be a simple text, locale specific objects like dates or numbers or even translations.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ListComponentappend(ComponentLike component) Appends the given component to this component.default ComponentConverts this object to aComponent.default Componentcompress()Compresses this component.Returns the text textStyle of this component.
-
Method Details
-
getTextStyle
TextStyle getTextStyle()Returns the text textStyle of this component. -
append
Appends the given component to this component.- Parameters:
component- the component to append- Returns:
- the concatenated component
-
compress
Compresses this component. Removing empty subcommands and/or merging subcomponents if necessary.- Returns:
- the compressed component
-
asComponent
Description copied from interface:ComponentLikeConverts this object to aComponent.- Specified by:
asComponentin interfaceComponentLike
-