org.apache.commons.collections.functors
Class FactoryTransformer
java.lang.Object
org.apache.commons.collections.functors.FactoryTransformer
- Serializable, Transformer
public class FactoryTransformer
extends java.lang.Object
Transformer implementation that calls a Factory and returns the result.
Version:
- Stephen Colebourne
- Commons Collections 3.0
FactoryTransformer
public FactoryTransformer(Factory factory)
Constructor that performs no validation.
Use getInstance
if you want that.
factory
- the factory to call, not null
getFactory
public Factory getFactory()
Gets the factory.
- the factory
- Commons Collections 3.1
getInstance
public static Transformer getInstance(Factory factory)
Factory method that performs validation.
factory
- the factory to call, not null
- the
factory
transformer
transform
public Object transform(Object input)
Transforms the input by ignoring the input and returning the result of
calling the decorated factory.
- transform in interface Transformer
input
- the input object to transform
- the transformed result
Copyright © 2001-2005 Apache Software Foundation. All Rights Reserved.