public static <T, V> ObjectLongMap<V> sumByLong( Iterable<T> iterable, Function<T, 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; }
@Override public SumByLongProcedure<T, V> create() { return new SumByLongProcedure<>(this.groupBy, this.function); } }
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> 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; }
@Override public SumByLongProcedure<T, V> create() { return new SumByLongProcedure<>(this.groupBy, this.function); } }
@Override public SumByLongProcedure<T, V> create() { return new SumByLongProcedure<>(this.groupBy, this.function); } }