private static class StringEscapeUtils.AggregateTranslator extends StringEscapeUtils.CharSequenceTranslator
Executes a sequence of translators one after the other. Execution ends whenever the first translator consumes codepoints from the input.
| Modifier and Type | Field and Description |
|---|---|
private StringEscapeUtils.CharSequenceTranslator[] |
translators |
| Constructor and Description |
|---|
AggregateTranslator(StringEscapeUtils.CharSequenceTranslator... translators)
Specify the translators to be used at creation time.
|
| Modifier and Type | Method and Description |
|---|---|
int |
translate(java.lang.CharSequence input,
int index,
java.io.Writer out)
The first translator to consume codepoints from the input is the 'winner'.
|
translate, translate, withprivate final StringEscapeUtils.CharSequenceTranslator[] translators
public AggregateTranslator(StringEscapeUtils.CharSequenceTranslator... translators)
translators - CharSequenceTranslator array to aggregatepublic int translate(java.lang.CharSequence input,
int index,
java.io.Writer out)
throws java.io.IOException
translate in class StringEscapeUtils.CharSequenceTranslatorinput - CharSequence that is being translatedindex - int representing the current point of translationout - Writer to translate the text tojava.io.IOException - if and only if the Writer produces an IOException