| java.lang.Object org.apache.commons.collections.functors.ClosureTransformer
ClosureTransformer | public class ClosureTransformer implements Transformer,Serializable(Code) | | Transformer implementation that calls a Closure using the input object
and then returns the input.
since: Commons Collections 3.0 version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $ author: Stephen Colebourne |
ClosureTransformer | public ClosureTransformer(Closure closure)(Code) | | Constructor that performs no validation.
Use getInstance if you want that.
Parameters: closure - the closure to call, not null |
getClosure | public Closure getClosure()(Code) | | Gets the closure.
the closure since: Commons Collections 3.1 |
getInstance | public static Transformer getInstance(Closure closure)(Code) | | Factory method that performs validation.
Parameters: closure - the closure to call, not null the closure transformer throws: IllegalArgumentException - if the closure is null |
transform | public Object transform(Object input)(Code) | | Transforms the input to result by executing a closure.
Parameters: input - the input object to transform the transformed result |
|
|