/** * Invokes this closure once for each item in the given iterable. * @param vars The variables used to invoke this closure once for each of its item * @return A list of Object containing the results of each closure invocation */ public List<?> each(Iterable<? extends A> vars) { return closeAll(vars); }
/** * Invokes this closure once for each passed variable. * @param vars The set of variables used to invoke this closure once for each variable * @return A list of Object containing the results of each closure invocation */ public List<?> each(A... vars) { return closeAll(vars); }