| java.lang.Object org.apache.commons.collections.functors.ChainedTransformer
ChainedTransformer | public class ChainedTransformer implements Transformer,Serializable(Code) | | 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.
since: Commons Collections 3.0 version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $ author: Stephen Colebourne |
ChainedTransformer | public ChainedTransformer(Transformer[] transformers)(Code) | | Constructor that performs no validation.
Use getInstance if you want that.
Parameters: transformers - the transformers to chain, not copied, no nulls |
getInstance | public static Transformer getInstance(Transformer[] transformers)(Code) | | Factory method that performs validation and copies the parameter array.
Parameters: transformers - the transformers to chain, copied, no nulls the chained transformer throws: IllegalArgumentException - if the transformers array is null throws: IllegalArgumentException - if any transformer in the array is null |
getInstance | public static Transformer getInstance(Collection transformers)(Code) | | Create a new Transformer that calls each transformer in turn, passing the
result into the next transformer. The ordering is that of the iterator()
method on the collection.
Parameters: transformers - a collection of transformers to chain the chained transformer throws: IllegalArgumentException - if the transformers collection is null throws: IllegalArgumentException - if any transformer in the collection is null |
getInstance | public static Transformer getInstance(Transformer transformer1, Transformer transformer2)(Code) | | Factory method that performs validation.
Parameters: transformer1 - the first transformer, not null Parameters: transformer2 - the second transformer, not null the chained transformer throws: IllegalArgumentException - if either transformer is null |
getTransformers | public Transformer[] getTransformers()(Code) | | Gets the transformers, do not modify the array.
the transformers since: Commons Collections 3.1 |
transform | public Object transform(Object object)(Code) | | Transforms the input to result via each decorated transformer
Parameters: object - the input object passed to the first transformer the transformed result |
|
|