public class ChainedClosure<E> extends Objectimplements Closure <E>, Serializable
| Constructor and Description |
|---|
ChainedClosure(Closure
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
static <E> Closure |
chainedClosure(Closure
Factory method that performs validation and copies the parameter array.
|
static <E> Closure |
chainedClosure(Collection
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 |
getClosures()
Gets the closures.
|
public static <E> Closure<E> chainedClosure(Closure <? super E>... closures)
E - the type that the closure acts on
closures - the closures to chain, copied, no nulls
chained closure
NullPointerException - if the closures array is null
NullPointerException - if any closure in the array is null
public static <E> Closure<E> chainedClosure(Collection <? extends Closure <? super E>> closures)
E - the type that the closure acts on
closures - a collection of closures to chain
chained closure
NullPointerException - if the closures collection is null
NullPointerException - if any closure in the collection is null
public void execute(E input)