Пример #1
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.collections4.functors.ChainedClosure
  * @param <E> the type that the closure acts on
  * @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 <E> Closure<E> chainedClosure(
     final Collection<? extends Closure<? super E>> closures) {
   return ChainedClosure.chainedClosure(closures);
 }
Пример #2
0
 /**
  * Create a new Closure that calls each closure in turn, passing the result into the next closure.
  *
  * @see org.apache.commons.collections4.functors.ChainedClosure
  * @param <E> the type that the closure acts on
  * @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 <E> Closure<E> chainedClosure(final Closure<? super E>... closures) {
   return ChainedClosure.chainedClosure(closures);
 }