org.apache.commons.collections.functors
public class ClosureTransformer extends Object implements Transformer, Serializable
Since: Commons Collections 3.0
Version: $Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
| 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.
|
getInstance if you want that.
Parameters: closure the closure to call, not null
Returns: the closure
Since: Commons Collections 3.1
Parameters: closure the closure to call, not null
Returns: the closure transformer
Throws: IllegalArgumentException if the closure is null
Parameters: input the input object to transform
Returns: the transformed result