|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections4.functors.FactoryTransformer<I,O>
public class FactoryTransformer<I,O>
Transformer implementation that calls a Factory and returns the result.
| Constructor Summary | |
|---|---|
FactoryTransformer(Factory<? extends O> factory)
Constructor that performs no validation. |
|
| Method Summary | ||
|---|---|---|
static
|
factoryTransformer(Factory<? extends O> factory)
Factory method that performs validation. |
|
Factory<? extends O> |
getFactory()
Gets the factory. |
|
O |
transform(I 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<? extends O> factory)
factoryTransformer if you want that.
factory - the factory to call, not null| Method Detail |
|---|
public static <I,O> Transformer<I,O> factoryTransformer(Factory<? extends O> factory)
I - the input typeO - the output typefactory - the factory to call, not null
factory transformer
IllegalArgumentException - if the factory is nullpublic O transform(I input)
transform in interface Transformer<I,O>input - the input object to transform
public Factory<? extends O> getFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||