|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.collections.functors.ChainedClosure
public class ChainedClosure
Closure implementation that chains the specified closures together.
Constructor Summary | |
---|---|
ChainedClosure(Closure[] closures)
Constructor that performs no validation. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChainedClosure(Closure[] closures)
getInstance
if you want that.
closures
- the closures to chain, not copied, no nullsMethod Detail |
---|
public static Closure getInstance(Closure[] closures)
closures
- the closures to chain, copied, no nulls
chained
closure
java.lang.IllegalArgumentException
- if the closures array is null
java.lang.IllegalArgumentException
- if any closure in the array is nullpublic static Closure getInstance(java.util.Collection closures)
closures
- a collection of closures to chain
chained
closure
java.lang.IllegalArgumentException
- if the closures collection is null
java.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 null
chained
closure
java.lang.IllegalArgumentException
- if either closure is nullpublic void execute(java.lang.Object input)
execute
in interface Closure
input
- the input object passed to each closurepublic Closure[] getClosures()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |