org.apache.commons.collections.functors
public class ClosureTransformer extends Object implements Transformer, Serializable
Since: Commons Collections 3.0
Version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
| 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