| java.lang.Object org.apache.commons.collections.functors.ChainedClosure
ChainedClosure | public class ChainedClosure implements Closure,Serializable(Code) | | Closure implementation that chains the specified closures together.
since: Commons Collections 3.0 version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $ author: Stephen Colebourne |
ChainedClosure | public ChainedClosure(Closure[] closures)(Code) | | Constructor that performs no validation.
Use getInstance if you want that.
Parameters: closures - the closures to chain, not copied, no nulls |
execute | public void execute(Object input)(Code) | | Execute a list of closures.
Parameters: input - the input object passed to each closure |
getClosures | public Closure[] getClosures()(Code) | | Gets the closures, do not modify the array.
the closures since: Commons Collections 3.1 |
getInstance | public static Closure getInstance(Closure[] closures)(Code) | | Factory method that performs validation and copies the parameter array.
Parameters: closures - the closures to chain, copied, no nulls the chained closure throws: IllegalArgumentException - if the closures array is null throws: IllegalArgumentException - if any closure in the array is null |
getInstance | public static Closure getInstance(Collection closures)(Code) | | Create a new Closure that calls each closure in turn, passing the
result into the next closure. The ordering is that of the iterator()
method on the collection.
Parameters: closures - a collection of closures to chain the chained closure throws: IllegalArgumentException - if the closures collection is null throws: IllegalArgumentException - if any closure in the collection is null |
getInstance | public static Closure getInstance(Closure closure1, Closure closure2)(Code) | | Factory method that performs validation.
Parameters: closure1 - the first closure, not null Parameters: closure2 - the second closure, not null the chained closure throws: IllegalArgumentException - if either closure is null |
|
|