|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.functors.TransformerClosure<E>
public class TransformerClosure<E>
Closure implementation that calls a Transformer using the input object and ignore the result.
Constructor Summary | |
---|---|
TransformerClosure(Transformer<? super E,?> transformer)
Constructor that performs no validation. |
Method Summary | ||
---|---|---|
void |
execute(E input)
Executes the closure by calling the decorated transformer. |
|
Transformer<? super E,?> |
getTransformer()
Gets the transformer. |
|
static
|
transformerClosure(Transformer<? super E,?> transformer)
Factory method that performs validation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransformerClosure(Transformer<? super E,?> transformer)
transformerClosure
if you want that.
transformer
- the transformer to call, not nullMethod Detail |
---|
public static <E> Closure<E> transformerClosure(Transformer<? super E,?> transformer)
A null transformer will return the NOPClosure
.
E
- the type that the closure acts ontransformer
- the transformer to call, null means nop
transformer
closurepublic void execute(E input)
execute
in interface Closure<E>
input
- the input objectpublic Transformer<? super E,?> getTransformer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |