public class ChainedClosure<E> extends java.lang.Object implements Closure<E>, java.io.Serializable
Constructor and Description |
---|
ChainedClosure(Closure<? super E>... closures)
Constructor that performs no validation.
|
Modifier and Type | Method and Description |
---|---|
static <E> Closure<E> |
chainedClosure(Closure<? super E>... closures)
Factory method that performs validation and copies the parameter array.
|
static <E> Closure<E> |
chainedClosure(java.util.Collection<? extends Closure<? super E>> closures)
Create a new Closure that calls each closure in turn, passing the
result into the next closure.
|
void |
execute(E input)
Execute a list of closures.
|
Closure<? super E>[] |
getClosures()
Gets the closures.
|
public static <E> Closure<E> chainedClosure(Closure<? super E>... closures)
E
- the type that the closure acts onclosures
- the closures to chain, copied, no nullschained
closurejava.lang.NullPointerException
- if the closures array is nulljava.lang.NullPointerException
- if any closure in the array is nullpublic static <E> Closure<E> chainedClosure(java.util.Collection<? extends Closure<? super E>> closures)
E
- the type that the closure acts onclosures
- a collection of closures to chainchained
closurejava.lang.NullPointerException
- if the closures collection is nulljava.lang.NullPointerException
- if any closure in the collection is nullpublic void execute(E input)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"