Example #1
0
 /**
  * Create a new Closure that calls each closure in turn, passing the
  * result into the next closure.
  *
  * @see org.apache.commons.collections.functors.ChainedClosure
  *
  * @param closures  an array of closures to chain
  * @return the <code>chained</code> closure
  * @throws IllegalArgumentException if the closures array is null
  * @throws IllegalArgumentException if any closure in the array is null
  */
 public static Closure chainedClosure(Closure[] closures)
 {
     return(ChainedClosure.getInstance(closures));
 }
Example #2
0
 /**
  * Create a new Closure that calls each closure in turn, passing the
  * result into the next closure. The ordering is that of the iterator()
  * method on the collection.
  *
  * @see org.apache.commons.collections.functors.ChainedClosure
  *
  * @param closures  a collection of closures to chain
  * @return the <code>chained</code> closure
  * @throws IllegalArgumentException if the closures collection is null
  * @throws IllegalArgumentException if the closures collection is empty
  * @throws IllegalArgumentException if any closure in the collection is null
  */
 public static Closure chainedClosure(java.util.Collection <Object> closures)
 {
     return(ChainedClosure.getInstance(closures));
 }
Example #3
0
 /**
  * Create a new Closure that calls two Closures, passing the result of
  * the first into the second.
  *
  * @see org.apache.commons.collections.functors.ChainedClosure
  *
  * @param closure1  the first closure
  * @param closure2  the second closure
  * @return the <code>chained</code> closure
  * @throws IllegalArgumentException if either closure is null
  */
 public static Closure chainedClosure(Closure closure1, Closure closure2)
 {
     return(ChainedClosure.getInstance(closure1, closure2));
 }