public static <T, BT extends Procedure<? super T>> void forEach( Iterable<T> iterable, ProcedureFactory<BT> procedureFactory, Combiner<BT> combiner) { ParallelIterate.forEach(iterable, procedureFactory, combiner, ParallelIterate.EXECUTOR_SERVICE); }
public static <T, BT extends Procedure<? super T>> void forEach( Iterable<T> iterable, ProcedureFactory<BT> procedureFactory, Combiner<BT> combiner) { ParallelIterate.forEach(iterable, procedureFactory, combiner, ParallelIterate.EXECUTOR_SERVICE); }
public static <T, BT extends Procedure<? super T>> void forEach( Iterable<T> iterable, ProcedureFactory<BT> procedureFactory, Combiner<BT> combiner, int batchSize, Executor executor) { ParallelIterate.forEach(iterable, procedureFactory, combiner, batchSize, ParallelIterate.calculateTaskCount(iterable, batchSize), executor); }
public static <T, BT extends Procedure<? super T>> void forEach( Iterable<T> iterable, ProcedureFactory<BT> procedureFactory, Combiner<BT> combiner, int batchSize, Executor executor) { ParallelIterate.forEach(iterable, procedureFactory, combiner, batchSize, ParallelIterate.calculateTaskCount(iterable, batchSize), executor); }
@Override public CompositeFastList<E> reverseThis() { ParallelIterate.forEach(this.lists, REVERSE_LIST_PROCEDURE); this.lists.reverseThis(); return this; }
@Override public CompositeFastList<E> reverseThis() { ParallelIterate.forEach(this.lists, REVERSE_LIST_PROCEDURE); this.lists.reverseThis(); return this; }
public static <T> void forEach(Iterable<T> iterable, Procedure<? super T> procedure, int batchSize, Executor executor) { ParallelIterate.forEach(iterable, procedure, batchSize, ParallelIterate.calculateTaskCount(iterable, batchSize), executor); }
public static <T> void forEach(Iterable<T> iterable, Procedure<? super T> procedure, int batchSize, Executor executor) { ParallelIterate.forEach(iterable, procedure, batchSize, ParallelIterate.calculateTaskCount(iterable, batchSize), executor); }
public static <T, BT extends Procedure<? super T>> void forEach( Iterable<T> iterable, BT procedure, int minForkSize, int taskCount, Executor executor) { ParallelIterate.forEach( iterable, new PassThruProcedureFactory<>(procedure), new PassThruCombiner<>(), minForkSize, taskCount, executor); }
public static <T, BT extends Procedure<? super T>> void forEach( Iterable<T> iterable, BT procedure, int minForkSize, int taskCount, Executor executor) { ParallelIterate.forEach( iterable, new PassThruProcedureFactory<>(procedure), new PassThruCombiner<>(), minForkSize, taskCount, executor); }
public static <T, V> ObjectLongMap<V> sumByLong( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, LongFunction<? super T> function) { ObjectLongHashMap<V> result = ObjectLongHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByLongProcedure<>(groupBy, function), new SumByLongCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
public static <T, V> ObjectDoubleMap<V> sumByFloat( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function) { ObjectDoubleHashMap<V> result = ObjectDoubleHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByFloatProcedure<>(groupBy, function), new SumByFloatCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
public static <T, V> ObjectLongMap<V> sumByInt( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, IntFunction<? super T> function) { ObjectLongHashMap<V> result = ObjectLongHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByIntProcedure<>(groupBy, function), new SumByIntCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
public static <T, V> ObjectLongMap<V> sumByLong( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, LongFunction<? super T> function) { ObjectLongHashMap<V> result = ObjectLongHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByLongProcedure<>(groupBy, function), new SumByLongCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
public static <T, V> ObjectDoubleMap<V> sumByDouble( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function) { ObjectDoubleHashMap<V> result = ObjectDoubleHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByDoubleProcedure<>(groupBy, function), new SumByDoubleCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
public static <T, V> ObjectDoubleMap<V> sumByFloat( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function) { ObjectDoubleHashMap<V> result = ObjectDoubleHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByFloatProcedure<>(groupBy, function), new SumByFloatCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
public static <T, V> ObjectLongMap<V> sumByInt( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, IntFunction<? super T> function) { ObjectLongHashMap<V> result = ObjectLongHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByIntProcedure<>(groupBy, function), new SumByIntCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
public static <T, V> ObjectDoubleMap<V> sumByDouble( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function) { ObjectDoubleHashMap<V> result = ObjectDoubleHashMap.newMap(); ParallelIterate.forEach( iterable, new SumByDoubleProcedure<>(groupBy, function), new SumByDoubleCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }
/** * Same effect as {@link Iterate#count(Iterable, Predicate)}, but executed in parallel batches. * * @return The number of elements which satisfy the predicate. */ public static <T> int count(Iterable<T> iterable, Predicate<? super T> predicate, int batchSize, Executor executor) { CountCombiner<T> combiner = new CountCombiner<>(); CountProcedureFactory<T> procedureFactory = new CountProcedureFactory<>(predicate); ParallelIterate.forEach( iterable, procedureFactory, combiner, batchSize, executor); return combiner.getCount(); }
/** * @since 6.0 */ public static <V, T> MutableMap<V, BigInteger> sumByBigInteger( Iterable<T> iterable, Function<? super T, ? extends V> groupBy, Function<? super T, BigInteger> function) { MutableMap<V, BigInteger> result = UnifiedMap.newMap(); ParallelIterate.forEach( iterable, new SumByBigIntegerProcedure<>(groupBy, function), new SumByBigIntegerCombiner<>(result), ParallelIterate.DEFAULT_MIN_FORK_SIZE, ParallelIterate.EXECUTOR_SERVICE); return result; }