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