Class ChainedClosure
- java.lang.Object
 - 
- org.apache.commons.collections.functors.ChainedClosure
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,Closure
@Deprecated(since="2021-04-30") public class ChainedClosure extends java.lang.Object implements Closure, java.io.Serializable
Deprecated.Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.Closure implementation that chains the specified closures together.- Since:
 - Commons Collections 3.0
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ChainedClosure(Closure[] closures)Deprecated.Constructor that performs no validation. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidexecute(java.lang.Object input)Deprecated.Execute a list of closures.Closure[]getClosures()Deprecated.Gets the closures, do not modify the array.static ClosuregetInstance(java.util.Collection closures)Deprecated.Create a new Closure that calls each closure in turn, passing the result into the next closure.static ClosuregetInstance(Closure[] closures)Deprecated.Factory method that performs validation and copies the parameter array.static ClosuregetInstance(Closure closure1, Closure closure2)Deprecated.Factory method that performs validation. 
 - 
 
- 
- 
Constructor Detail
- 
ChainedClosure
public ChainedClosure(Closure[] closures)
Deprecated.Constructor that performs no validation. UsegetInstanceif you want that.- Parameters:
 closures- the closures to chain, not copied, no nulls
 
 - 
 
- 
Method Detail
- 
getInstance
public static Closure getInstance(Closure[] closures)
Deprecated.Factory method that performs validation and copies the parameter array.- Parameters:
 closures- the closures to chain, copied, no nulls- Returns:
 - the 
chainedclosure - Throws:
 java.lang.IllegalArgumentException- if the closures array is nulljava.lang.IllegalArgumentException- if any closure in the array is null
 
- 
getInstance
public static Closure getInstance(java.util.Collection closures)
Deprecated.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- Returns:
 - the 
chainedclosure - Throws:
 java.lang.IllegalArgumentException- if the closures collection is nulljava.lang.IllegalArgumentException- if any closure in the collection is null
 
- 
getInstance
public static Closure getInstance(Closure closure1, Closure closure2)
Deprecated.Factory method that performs validation.- Parameters:
 closure1- the first closure, not nullclosure2- the second closure, not null- Returns:
 - the 
chainedclosure - Throws:
 java.lang.IllegalArgumentException- if either closure is null
 
- 
execute
public void execute(java.lang.Object input)
Deprecated.Execute a list of closures. 
- 
getClosures
public Closure[] getClosures()
Deprecated.Gets the closures, do not modify the array.- Returns:
 - the closures
 - Since:
 - Commons Collections 3.1
 
 
 - 
 
 -