|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.collections.functors.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. |
Object |
transform(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 null| Method Detail |
public static Transformer getInstance(Closure closure)
closure - the closure to call, not null
closure transformer
IllegalArgumentException - if the closure is nullpublic Object transform(Object input)
transform in interface Transformerinput - the input object to transform
public Closure getClosure()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||