Package net.kyori.adventure.text
Class AbstractComponent
java.lang.Object
net.kyori.adventure.text.AbstractComponent
- All Implemented Interfaces:
- Component,- ComponentBuilderApplicable,- ComponentLike,- HoverEventSource<Component>,- net.kyori.examination.Examinable
public abstract class AbstractComponent extends Object implements Component
An abstract implementation of a text component.
- Since:
- 4.0.0
- 
Field Summary
- 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractComponent(@NonNull List<? extends ComponentLike> children, @NonNull Style style)
- 
Method SummaryModifier and Type Method Description @NonNull List<Component>children()Gets the unmodifiable list of children.booleanequals(@Nullable Object other)@NonNull Stream<? extends net.kyori.examination.ExaminableProperty>examinableProperties()inthashCode()@NonNull ComponentreplaceText(@NonNull Consumer<TextReplacementConfig.Builder> configurer)Finds and replaces any text with this or childComponents using the configured options.@NonNull ComponentreplaceText(@NonNull TextReplacementConfig config)Finds and replaces any text with this or childComponents using the provided options.@NonNull Stylestyle()Gets the style of this component.StringtoString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.text.Componentappend, append, append, asComponent, asHoverEvent, children, clickEvent, clickEvent, color, color, colorIfAbsent, componentBuilderApply, contains, decorate, decoration, decoration, decoration, decorations, decorations, detectCycle, hasDecoration, hasStyling, hoverEvent, hoverEvent, insertion, insertion, mergeStyle, mergeStyle, mergeStyle, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, style, style, style, style
- 
Field Details
- 
Constructor Details
- 
Method Details- 
childrenDescription copied from interface:ComponentGets the unmodifiable list of children.
- 
styleDescription copied from interface:ComponentGets the style of this component.
- 
replaceTextDescription copied from interface:ComponentFinds and replaces any text with this or childComponents using the configured options.- Specified by:
- replaceTextin interface- Component
- Parameters:
- configurer- the configurer
- Returns:
- a modified copy of this component
 
- 
replaceTextDescription copied from interface:ComponentFinds and replaces any text with this or childComponents using the provided options.- Specified by:
- replaceTextin interface- Component
- Parameters:
- config- the replacement config
- Returns:
- a modified copy of this component
 
- 
equals
- 
hashCodepublic int hashCode()
- 
examinableProperties- Specified by:
- examinablePropertiesin interface- net.kyori.examination.Examinable
 
- 
toString
 
-