|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections15.functors.ChainedClosure<T>
public class ChainedClosure<T>
Closure implementation that chains the specified closures together.
| Constructor Summary | |
|---|---|
ChainedClosure(Closure<? super T>[] closures)
Constructor that performs no validation. |
|
| Method Summary | ||
|---|---|---|
void |
execute(T input)
Execute a list of closures. |
|
Closure<? super T>[] |
getClosures()
Gets the closures, do not modify the array. |
|
static
|
getInstance(Closure<? super T>[] closures)
Factory method that performs validation and copies the parameter array. |
|
static
|
getInstance(Closure<? super T> closure1,
Closure<? super T> closure2)
Factory method that performs validation. |
|
static
|
getInstance(Collection<? super T> closures)
Create a new Closure that calls each closure in turn, passing the result into the next closure. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChainedClosure(Closure<? super T>[] closures)
getInstance if you want that.
closures - the closures to chain, not copied, no nulls| Method Detail |
|---|
public static <T> Closure<T> getInstance(Closure<? super T>[] closures)
closures - the closures to chain, copied, no nulls
chained closure
IllegalArgumentException - if the closures array is null
IllegalArgumentException - if any closure in the array is nullpublic static <T> Closure<T> getInstance(Collection<? super T> closures)
closures - a collection of closures to chain
chained closure
IllegalArgumentException - if the closures collection is null
IllegalArgumentException - if any closure in the collection is null
public static <T> Closure<T> getInstance(Closure<? super T> closure1,
Closure<? super T> closure2)
closure1 - the first closure, not nullclosure2 - the second closure, not null
chained closure
IllegalArgumentException - if either closure is nullpublic void execute(T input)
execute in interface Closure<T>input - the input object passed to each closurepublic Closure<? super T>[] getClosures()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||