| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections.functors.ClosureTransformer<T>
public class ClosureTransformer<T>
Transformer implementation that calls a Closure using the input object and then returns the input.
| Constructor Summary | |
|---|---|
| ClosureTransformer(Closure<T> closure)Constructor that performs no validation. | |
| Method Summary | ||
|---|---|---|
|  Closure<T> | getClosure()Gets the closure. | |
| static
 | getInstance(Closure<T> closure)Factory method that performs validation. | |
|  T | transform(T 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<T> closure)
getInstance if you want that.
closure - the closure to call, not null| Method Detail | 
|---|
public static <T> Transformer<T,T> getInstance(Closure<T> closure)
closure - the closure to call, not null
closure transformer
IllegalArgumentException - if the closure is nullpublic T transform(T input)
transform in interface Transformer<T,T>input - the input object to transform
public Closure<T> getClosure()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||