public abstract class BaseText extends Object implements MutableText
Text.SerializerStringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>| Modifier and Type | Field and Description |
|---|---|
private OrderedText |
orderedText |
private Language |
previousLanguage |
protected List<Text> |
siblings |
private Style |
style |
EMPTY, TERMINATE_VISIT| Constructor and Description |
|---|
BaseText() |
| Modifier and Type | Method and Description |
|---|---|
MutableText |
append(Text text)
Appends a text to this text's siblings.
|
OrderedText |
asOrderedText() |
String |
asString()
Returns the string representation of this text itself, excluding siblings.
|
abstract BaseText |
copy()
Copies the text itself, excluding the styles or siblings.
|
boolean |
equals(Object obj) |
List<Text> |
getSiblings()
Returns the siblings of this text.
|
Style |
getStyle()
Returns the style of this text.
|
int |
hashCode() |
MutableText |
setStyle(Style style)
Sets the style of this text.
|
MutableText |
shallowCopy()
Copies the text itself, the style, and the siblings.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitappend, fillStyle, formatted, formatted, styledasTruncatedString, getString, of, visit, visit, visitSelf, visitSelfconcat, concat, plain, styledprivate OrderedText orderedText
private Style style
public MutableText append(Text text)
append in interface MutableTexttext - the siblingpublic String asString()
public List<Text> getSiblings()
getSiblings in interface Textpublic MutableText setStyle(Style style)
setStyle in interface MutableTextpublic Style getStyle()
public abstract BaseText copy()
Textpublic final MutableText shallowCopy()
A shallow copy is made for the siblings.
shallowCopy in interface Text@Environment(value=CLIENT) public OrderedText asOrderedText()
asOrderedText in interface Text