| Modifier and Type | Method and Description |
|---|---|
Optional<T> |
accept(Style style,
String asString)
Visits a text's contextual style and
asString
result. |
Optional<T> accept(Style style, String asString)
asString
result.
A contextual style is obtained by calling Style.withParent(Style)
on the current's text style, passing the previous contextual style or
the starting style if it is the beginning of a visit.
When a present optional is returned,
the visit is terminated before visiting all text. Can return Text.TERMINATE_VISIT for convenience.