|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.functors.FactoryTransformer<T>
public class FactoryTransformer<T>
Transformer implementation that calls a Factory and returns the result.
Constructor Summary | |
---|---|
FactoryTransformer(Factory<T> factory)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
Factory<T> |
getFactory()
Gets the factory. |
|
static
|
getInstance(Factory<T> factory)
Factory method that performs validation. |
|
T |
transform(Object input)
Transforms the input by ignoring the input and returning the result of calling the decorated factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FactoryTransformer(Factory<T> factory)
getInstance
if you want that.
factory
- the factory to call, not nullMethod Detail |
---|
public static <T> Transformer<Object,T> getInstance(Factory<T> factory)
factory
- the factory to call, not null
factory
transformer
IllegalArgumentException
- if the factory is nullpublic T transform(Object input)
transform
in interface Transformer<Object,T>
input
- the input object to transform
public Factory<T> getFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |