public abstract class CharSequenceTranslator extends Object
| Constructor and Description |
|---|
CharSequenceTranslator() |
| Modifier and Type | Method and Description |
|---|---|
static String |
hex(int codePoint)
Returns an upper case hexadecimal
String for the given
character. |
String |
translate(CharSequence input)
Helper for non-Writer usage.
|
abstract int |
translate(CharSequence input,
int index,
Writer writer)
Translate a set of code points, represented by an int index into a CharSequence,
into another set of code points.
|
void |
translate(CharSequence input,
Writer writer)
Translate an input onto a Writer.
|
CharSequenceTranslator |
with(CharSequenceTranslator... translators)
Helper method to create a merger of this translator with another set of
translators.
|
public CharSequenceTranslator()
public static String hex(int codePoint)
String for the given
character.codePoint - The code point to convert.Stringpublic final String translate(CharSequence input)
input - CharSequence to be translatedpublic abstract int translate(CharSequence input, int index, Writer writer) throws IOException
input - CharSequence that is being translatedindex - int representing the current point of translationwriter - Writer to translate the text toIOException - if and only if the Writer produces an IOExceptionpublic final void translate(CharSequence input, Writer writer) throws IOException
input - CharSequence that is being translatedwriter - Writer to translate the text toIOException - if and only if the Writer produces an IOExceptionpublic final CharSequenceTranslator with(CharSequenceTranslator... translators)
translators - CharSequenceTranslator array of translators to merge with this oneCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.