@Environment(value=CLIENT) static class TextHandler.StyledString extends Object implements StringVisitable
StringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>
Modifier and Type | Field and Description |
---|---|
private String |
literal |
private Style |
style |
EMPTY, TERMINATE_VISIT
Constructor and Description |
---|
StyledString(String literal,
Style style) |
Modifier and Type | Method and Description |
---|---|
<T> Optional<T> |
visit(StringVisitable.StyledVisitor<T> styledVisitor,
Style style)
Supplies this visitable's literal content and contextual style to
the visitor.
|
<T> Optional<T> |
visit(StringVisitable.Visitor<T> visitor)
Supplies this visitable's literal content to the visitor.
|
public <T> Optional<T> visit(StringVisitable.Visitor<T> visitor)
visit
in interface StringVisitable
visitor
- the visitorOptional.empty()
if the visit finished, or a terminating
result from the visitor
public <T> Optional<T> visit(StringVisitable.StyledVisitor<T> styledVisitor, Style style)
visit
in interface StringVisitable
styledVisitor
- the visitorstyle
- the contextual styleOptional.empty()
if the visit finished, or a terminating
result from the visitor