Class ChainedClosure
java.lang.Object
org.apache.commons.collections.functors.ChainedClosure
- All Implemented Interfaces:
Serializable,Closure
@Deprecated(since="2021-04-30")
public class ChainedClosure
extends Object
implements Closure, Serializable
Deprecated.
Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.
Closure implementation that chains the specified closures together.
- Since:
- Commons Collections 3.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChainedClosure(Closure[] closures) Deprecated.Constructor that performs no validation. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Execute a list of closures.Closure[]Deprecated.Gets the closures, do not modify the array.static ClosuregetInstance(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 Details
-
ChainedClosure
Deprecated.Constructor that performs no validation. UsegetInstanceif you want that.- Parameters:
closures- the closures to chain, not copied, no nulls
-
-
Method Details
-
getInstance
Deprecated.Factory method that performs validation and copies the parameter array.- Parameters:
closures- the closures to chain, copied, no nulls- Returns:
- the
chainedclosure - Throws:
IllegalArgumentException- if the closures array is nullIllegalArgumentException- if any closure in the array is null
-
getInstance
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:
IllegalArgumentException- if the closures collection is nullIllegalArgumentException- if any closure in the collection is null
-
getInstance
Deprecated.Factory method that performs validation.- Parameters:
closure1- the first closure, not nullclosure2- the second closure, not null- Returns:
- the
chainedclosure - Throws:
IllegalArgumentException- if either closure is null
-
execute
Deprecated.Execute a list of closures. -
getClosures
Deprecated.Gets the closures, do not modify the array.- Returns:
- the closures
- Since:
- Commons Collections 3.1
-