Top Description Fields Constructors Methods
org.apache.commons.lang3.text.translate

public Class AggregateTranslator

extends CharSequenceTranslator
Class Inheritance
Annotations
@Deprecated
Imports
java.io.IOException, .Writer, org.apache.commons.lang3.ArrayUtils

Deprecated

As of 3.6, use Apache Commons Text AggregateTranslator.

Executes a sequence of translators one after the other. Execution ends whenever the first translator consumes code points from the input.
Since
3.0

Field Summary

Modifier and TypeField and Description
private final CharSequenceTranslator[]
translators

References Deprecated CharSequenceTranslator is deprecated or references (maybe indirectly) at least one deprecated element.
Inherited from org.apache.commons.lang3.text.translate.CharSequenceTranslator:
HEX_DIGITS

Constructor Summary

AccessConstructor and Description
public
AggregateTranslator(final CharSequenceTranslator...
CharSequenceTranslator array to aggregate
translators
)
References Deprecated CharSequenceTranslator is deprecated or references (maybe indirectly) at least one deprecated element.

Specify the translators to be used at creation time.

Method Summary

Modifier and TypeMethod and Description
public int
translate(final CharSequence input, final int index, final Writer out)

Implements abstract org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate.

The first translator to consume code points from the input is the 'winner'.

Inherited from org.apache.commons.lang3.text.translate.CharSequenceTranslator:
hextranslatetranslatewith

Field Detail

translatorsback to summary
private final CharSequenceTranslator[] translators

References Deprecated

CharSequenceTranslator is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Detail

AggregateTranslatorback to summary
public AggregateTranslator(final CharSequenceTranslator... translators)

References Deprecated

CharSequenceTranslator is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Specify the translators to be used at creation time.

Parameters
translators:CharSequenceTranslator[]

CharSequenceTranslator array to aggregate

Method Detail

translateback to summary
public int translate(final CharSequence input, final int index, final Writer out) throws IOException

Implements abstract org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate.

Doc from org.apache.commons.lang3.text.translate.CharSequenceTranslator.translate.

The first translator to consume code points from the input is the 'winner'. Execution stops with the number of consumed code points being returned. 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.

Annotations
@Override
Exceptions
IOException:
if and only if the Writer produces an IOException.