@Override public void each(Procedure<? super T> procedure) { ArrayListIterate.forEach(this.delegate, procedure); }
public void forEach(int fromIndex, int toIndex, Procedure<? super T> procedure) { ArrayListIterate.forEach(this.delegate, fromIndex, toIndex, procedure); }
/** * Reverses over the List in reverse order executing the Procedure for each element */ public static <T> void reverseForEach(ArrayList<T> list, Procedure<? super T> procedure) { if (!list.isEmpty()) { ArrayListIterate.forEach(list, list.size() - 1, 0, procedure); } }
public static <T, K, V> MutableMap<K, V> aggregateInPlaceBy( ArrayList<T> list, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator) { MutableMap<K, V> map = UnifiedMap.newMap(); ArrayListIterate.forEach(list, new MutatingAggregationProcedure<T, K, V>(map, groupBy, zeroValueFactory, mutatingAggregator)); return map; }
public static <T, K, V> MutableMap<K, V> aggregateBy( ArrayList<T> list, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator) { MutableMap<K, V> map = UnifiedMap.newMap(); ArrayListIterate.forEach(list, new NonMutatingAggregationProcedure<T, K, V>(map, groupBy, zeroValueFactory, nonMutatingAggregator)); return map; } }
ArrayListIterate.forEach((ArrayList<T>) iterable, procedure);
@Override protected boolean exec() { try { this.procedure = this.procedureFactory.create(); if (this.list instanceof ListIterable) { ((ListIterable<T>) this.list).forEach(this.start, this.end, this.procedure); } else if (this.list instanceof ArrayList) { ArrayListIterate.forEach((ArrayList<T>) this.list, this.start, this.end, this.procedure); } else { ListIterate.forEach(this.list, this.start, this.end, this.procedure); } } catch (Throwable newError) { this.taskRunner.setFailed(newError); } finally { this.taskRunner.taskCompleted(this); } return true; }
public void run() { try { this.procedure = this.procedureFactory.create(); int stop = this.end - 1; if (this.list instanceof ListIterable) { ((ListIterable<T>) this.list).forEach(this.start, stop, this.procedure); } else if (this.list instanceof ArrayList) { ArrayListIterate.forEach((ArrayList<T>) this.list, this.start, stop, this.procedure); } else { ListIterate.forEach(this.list, this.start, stop, this.procedure); } } catch (Throwable newError) { this.taskRunner.setFailed(newError); } finally { this.taskRunner.taskCompleted(this); } }
@Override public void each(Procedure<? super T> procedure) { ArrayListIterate.forEach(this.delegate, procedure); }
public void forEach(int fromIndex, int toIndex, Procedure<? super T> procedure) { ArrayListIterate.forEach(this.delegate, fromIndex, toIndex, procedure); }
/** * Reverses over the List in reverse order executing the Procedure for each element */ public static <T> void reverseForEach(ArrayList<T> list, Procedure<? super T> procedure) { if (!list.isEmpty()) { ArrayListIterate.forEach(list, list.size() - 1, 0, procedure); } }
public static <T, K, V> MutableMap<K, V> aggregateInPlaceBy( ArrayList<T> list, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator) { MutableMap<K, V> map = UnifiedMap.newMap(); ArrayListIterate.forEach(list, new MutatingAggregationProcedure<T, K, V>(map, groupBy, zeroValueFactory, mutatingAggregator)); return map; }
public static <T, K, V> MutableMap<K, V> aggregateBy( ArrayList<T> list, Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator) { MutableMap<K, V> map = UnifiedMap.newMap(); ArrayListIterate.forEach(list, new NonMutatingAggregationProcedure<T, K, V>(map, groupBy, zeroValueFactory, nonMutatingAggregator)); return map; } }
ArrayListIterate.forEach((ArrayList<T>) iterable, procedure);
public void run() { try { this.procedure = this.procedureFactory.create(); int stop = this.end - 1; if (this.list instanceof ListIterable) { ((ListIterable<T>) this.list).forEach(this.start, stop, this.procedure); } else if (this.list instanceof ArrayList) { ArrayListIterate.forEach((ArrayList<T>) this.list, this.start, stop, this.procedure); } else { ListIterate.forEach(this.list, this.start, stop, this.procedure); } } catch (Throwable newError) { this.taskRunner.setFailed(newError); } finally { this.taskRunner.taskCompleted(this); } }
@Override protected boolean exec() { try { this.procedure = this.procedureFactory.create(); if (this.list instanceof ListIterable) { ((ListIterable<T>) this.list).forEach(this.start, this.end, this.procedure); } else if (this.list instanceof ArrayList) { ArrayListIterate.forEach((ArrayList<T>) this.list, this.start, this.end, this.procedure); } else { ListIterate.forEach(this.list, this.start, this.end, this.procedure); } } catch (Throwable newError) { this.taskRunner.setFailed(newError); } finally { this.taskRunner.taskCompleted(this); } return true; }