public class ChainedClosure extends java.lang.Object implements Closure, java.io.Serializable
| Constructor and Description |
|---|
ChainedClosure(Closure[] closures)
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.lang.Object input)
Execute a list of closures.
|
Closure[] |
getClosures()
Gets the closures, do not modify the array.
|
static Closure |
getInstance(Closure[] closures)
Factory method that performs validation and copies the parameter array.
|
static Closure |
getInstance(Closure closure1,
Closure closure2)
Factory method that performs validation.
|
static Closure |
getInstance(java.util.Collection closures)
Create a new Closure that calls each closure in turn, passing the
result into the next closure.
|
public ChainedClosure(Closure[] closures)
getInstance if you want that.closures - the closures to chain, not copied, no nullspublic static Closure getInstance(Closure[] closures)
closures - the closures to chain, copied, no nullschained closurejava.lang.IllegalArgumentException - if the closures array is nulljava.lang.IllegalArgumentException - if any closure in the array is nullpublic static Closure getInstance(java.util.Collection closures)
closures - a collection of closures to chainchained closurejava.lang.IllegalArgumentException - if the closures collection is nulljava.lang.IllegalArgumentException - if any closure in the collection is nullpublic static Closure getInstance(Closure closure1, Closure closure2)
closure1 - the first closure, not nullclosure2 - the second closure, not nullchained closurejava.lang.IllegalArgumentException - if either closure is nullpublic void execute(java.lang.Object input)
public Closure[] getClosures()
Copyright © 2010 - 2023 Adobe. All Rights Reserved