|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections4.functors.ChainedTransformer<T>
public class ChainedTransformer<T>
Transformer implementation that chains the specified transformers together.
The input object is passed to the first transformer. The transformed result is passed to the second transformer and so on.
| Constructor Summary | |
|---|---|
ChainedTransformer(Transformer<? super T,? extends T>... transformers)
Constructor that performs no validation. |
|
| Method Summary | ||
|---|---|---|
static
|
chainedTransformer(Collection<? extends Transformer<T,T>> transformers)
Create a new Transformer that calls each transformer in turn, passing the result into the next transformer. |
|
static
|
chainedTransformer(Transformer<? super T,? extends T>... transformers)
Factory method that performs validation and copies the parameter array. |
|
Transformer<? super T,? extends T>[] |
getTransformers()
Gets the transformers. |
|
T |
transform(T object)
Transforms the input to result via each decorated transformer |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChainedTransformer(Transformer<? super T,? extends T>... transformers)
chainedTransformer if you want that.
transformers - the transformers to chain, copied, no nulls| Method Detail |
|---|
public static <T> Transformer<T,T> chainedTransformer(Transformer<? super T,? extends T>... transformers)
T - the object typetransformers - the transformers to chain, copied, no nulls
chained transformer
IllegalArgumentException - if the transformers array is null
IllegalArgumentException - if any transformer in the array is nullpublic static <T> Transformer<T,T> chainedTransformer(Collection<? extends Transformer<T,T>> transformers)
T - the object typetransformers - a collection of transformers to chain
chained transformer
IllegalArgumentException - if the transformers collection is null
IllegalArgumentException - if any transformer in the collection is nullpublic T transform(T object)
transform in interface Transformer<T,T>object - the input object passed to the first transformer
public Transformer<? super T,? extends T>[] getTransformers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||