org.apache.commons.collections.functors
public class ChainedClosure extends Object implements Closure, Serializable
Since: Commons Collections 3.0
Version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
Constructor Summary | |
---|---|
ChainedClosure(Closure[] closures)
Constructor that performs no validation.
|
Method Summary | |
---|---|
void | execute(Object input)
Execute a list of closures.
|
Closure[] | getClosures()
Gets the closures, do not modify the array. |
static Closure | getInstance(Closure[] closures)
Factory method that performs validation and copies the parameter array.
|
static Closure | getInstance(Collection closures)
Create a new Closure that calls each closure in turn, passing the
result into the next closure. |
static Closure | getInstance(Closure closure1, Closure closure2)
Factory method that performs validation.
|
getInstance
if you want that.
Parameters: closures the closures to chain, not copied, no nulls
Parameters: input the input object passed to each closure
Returns: the closures
Since: Commons Collections 3.1
Parameters: closures the closures to chain, copied, no nulls
Returns: the chained
closure
Throws: IllegalArgumentException if the closures array is null IllegalArgumentException if any closure in the array is null
Parameters: closures a collection of closures to chain
Returns: the chained
closure
Throws: IllegalArgumentException if the closures collection is null IllegalArgumentException if any closure in the collection is null
Parameters: closure1 the first closure, not null closure2 the second closure, not null
Returns: the chained
closure
Throws: IllegalArgumentException if either closure is null