Deprecated
As of 3.6, use Apache Commons Text LookupTranslator.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final HashMap | |
| private final HashSet | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | LookupTranslator(final CharSequence[]...
CharSequence[][] table of size [*][2] lookup)Define the lookup table to be used in translation Note that, as of Lang 3.1, the key to the lookup table is converted to a java.lang.String. |
| Modifier and Type | Method and Description |
|---|---|
| public int | translate(final CharSequence input, final int index, final Writer out)
Implements abstract org. Translate a set of code points, represented by an int index into a CharSequence, into another set of code points. |
| longest | back to summary |
|---|---|
| private final int longest | |
| lookupMap | back to summary |
|---|---|
| private final HashMap<String, String> lookupMap | |
| prefixSet | back to summary |
|---|---|
| private final HashSet<Character> prefixSet | |
| shortest | back to summary |
|---|---|
| private final int shortest | |
| LookupTranslator | back to summary |
|---|---|
| public LookupTranslator(final CharSequence[]... lookup) Define the lookup table to be used in translation Note that, as of Lang 3.1, the key to the lookup table is converted to a java.lang.String. This is because we need the key to support hashCode and equals(Object), allowing it to be the key for a HashMap. See LANG-882.
| |
| translate | back to summary |
|---|---|
| public int translate(final CharSequence input, final int index, final Writer out) throws IOException Implements abstract org. Doc from org. Translate a set of code points, represented by an int index into a CharSequence, into another set of code points. The number of code points consumed must be returned, and the only IOExceptions thrown must be from interacting with the Writer so that the top level API may reliably ignore StringWriter IOExceptions.
| |