|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.collections15.functors.transformer.FactoryTransformer<I,O>
public class FactoryTransformer<I,O>
Transformer implementation whose transform(I)
method uses a Factory
to create the returned output object.
Constructor Summary | |
---|---|
protected |
FactoryTransformer(Factory<O> factory)
Creates a new instance that uses the specified Factory to
create the transform output objects. |
Method Summary | ||
---|---|---|
Factory<O> |
getFactory()
Returns the wrapped factory. |
|
static
|
getInstance(Factory<O> factory)
Factory method that performs validation. |
|
O |
transform(I input)
Transforms the input by ignoring the input and returning a new object created by the wrapped Factory . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FactoryTransformer(Factory<O> factory)
Factory
to
create the transform output objects.
factory
- The Factory
used to create the transform
output objects.
java.lang.IllegalArgumentException
- Thrown if factory
is
null
.Method Detail |
---|
public static <I,O> Transformer<I,O> getInstance(Factory<O> factory)
factory
- the factory to call, not null
factory
transformer
java.lang.IllegalArgumentException
- if the factory is nullpublic O transform(I input)
Factory
.
transform
in interface Transformer<I,O>
input
- The input object, which is ignored.
Factory
.public Factory<O> getFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |