Class AbstractParallelIterable<T,B extends Batch<T>>
java.lang.Object
org.eclipse.collections.impl.lazy.parallel.AbstractParallelIterable<T,B>
- All Implemented Interfaces:
ParallelIterable<T>
- Direct Known Subclasses:
AbstractParallelIterableImpl
,AbstractParallelListIterable
,AbstractParallelSortedSetIterable
,AbstractParallelUnsortedBag
,AbstractParallelUnsortedSetIterable
public abstract class AbstractParallelIterable<T,B extends Batch<T>>
extends Object
implements ParallelIterable<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<K,
V> MapIterable<K, V> aggregateBy
(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator) <K,
V> MapIterable<K, V> aggregateInPlaceBy
(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator) <P> boolean
allSatisfyWith
(Predicate2<? super T, ? super P> predicate, P parameter) <P> boolean
anySatisfyWith
(Predicate2<? super T, ? super P> predicate, P parameter) void
appendString
(Appendable appendable, String start, String separator, String end) int
<P> int
countWith
(Predicate2<? super T, ? super P> predicate, P parameter) detectIfNone
(Predicate<? super T> predicate, Function0<? extends T> function) <P> T
detectWith
(Predicate2<? super T, ? super P> predicate, P parameter) <P> T
detectWithIfNone
(Predicate2<? super T, ? super P> predicate, P parameter, Function0<? extends T> function) <P> void
forEachWith
(Procedure2<? super T, ? super P> procedure, P parameter) abstract int
abstract ExecutorService
<V> MapIterable<V,
T> groupByUniqueKey
(Function<? super T, ? extends V> function) max()
max
(Comparator<? super T> comparator) <V extends Comparable<? super V>>
Tmin()
min
(Comparator<? super T> comparator) <V extends Comparable<? super V>>
Tboolean
noneSatisfy
(Predicate<? super T> predicate) <P> boolean
noneSatisfyWith
(Predicate2<? super T, ? super P> predicate, P parameter) abstract LazyIterable<B>
split()
double
sumOfDouble
(DoubleFunction<? super T> function) Returns the final double result of evaluating function for each element of the iterable in parallel and adding the results together.double
sumOfFloat
(FloatFunction<? super T> function) Returns the final double result of evaluating function for each element of the iterable in parallel and adding the results together.long
sumOfInt
(IntFunction<? super T> function) Returns the final long result of evaluating function for each element of the iterable in parallel and adding the results together.long
sumOfLong
(LongFunction<? super T> function) Returns the final long result of evaluating function for each element of the iterable in parallel and adding the results together.<E> E[]
toArray
(E[] array) toBag()
toList()
<NK,
NV> MutableMap<NK, NV> toSet()
toSortedBag
(Comparator<? super T> comparator) <V extends Comparable<? super V>>
MutableSortedBag<T>toSortedBagBy
(Function<? super T, ? extends V> function) toSortedList
(Comparator<? super T> comparator) <V extends Comparable<? super V>>
MutableList<T>toSortedListBy
(Function<? super T, ? extends V> function) <NK,
NV> MutableSortedMap<NK, NV> toSortedMap
(Comparator<? super NK> comparator, Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction) <NK,
NV> MutableSortedMap<NK, NV> toSortedMap
(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction) toSortedSet
(Comparator<? super T> comparator) <V extends Comparable<? super V>>
MutableSortedSet<T>toSortedSetBy
(Function<? super T, ? extends V> function) toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.collections.api.ParallelIterable
allSatisfy, anySatisfy, appendString, appendString, asUnique, collect, collectIf, collectWith, detect, flatCollect, forEach, groupBy, groupByEach, makeString, makeString, makeString, reject, rejectWith, select, selectInstancesOf, selectWith, toArray, toSortedList
-
Constructor Details
-
AbstractParallelIterable
public AbstractParallelIterable()
-
-
Method Details
-
getExecutorService
-
getBatchSize
public abstract int getBatchSize() -
split
-
toString
-
appendString
- Specified by:
appendString
in interfaceParallelIterable<T>
-
forEachWith
- Specified by:
forEachWith
in interfaceParallelIterable<T>
-
anySatisfyWith
- Specified by:
anySatisfyWith
in interfaceParallelIterable<T>
-
allSatisfyWith
- Specified by:
allSatisfyWith
in interfaceParallelIterable<T>
-
noneSatisfy
- Specified by:
noneSatisfy
in interfaceParallelIterable<T>
-
noneSatisfyWith
- Specified by:
noneSatisfyWith
in interfaceParallelIterable<T>
-
detectWith
- Specified by:
detectWith
in interfaceParallelIterable<T>
-
detectIfNone
- Specified by:
detectIfNone
in interfaceParallelIterable<T>
-
detectWithIfNone
public <P> T detectWithIfNone(Predicate2<? super T, ? super P> predicate, P parameter, Function0<? extends T> function) - Specified by:
detectWithIfNone
in interfaceParallelIterable<T>
-
toArray
public <E> E[] toArray(E[] array) - Specified by:
toArray
in interfaceParallelIterable<T>
-
toList
- Specified by:
toList
in interfaceParallelIterable<T>
-
toSortedList
- Specified by:
toSortedList
in interfaceParallelIterable<T>
-
toSortedListBy
public <V extends Comparable<? super V>> MutableList<T> toSortedListBy(Function<? super T, ? extends V> function) - Specified by:
toSortedListBy
in interfaceParallelIterable<T>
-
toSet
- Specified by:
toSet
in interfaceParallelIterable<T>
-
toSortedSet
- Specified by:
toSortedSet
in interfaceParallelIterable<T>
-
toSortedSetBy
public <V extends Comparable<? super V>> MutableSortedSet<T> toSortedSetBy(Function<? super T, ? extends V> function) - Specified by:
toSortedSetBy
in interfaceParallelIterable<T>
-
toBag
- Specified by:
toBag
in interfaceParallelIterable<T>
-
toSortedBag
- Specified by:
toSortedBag
in interfaceParallelIterable<T>
-
toSortedBag
- Specified by:
toSortedBag
in interfaceParallelIterable<T>
-
toSortedBagBy
public <V extends Comparable<? super V>> MutableSortedBag<T> toSortedBagBy(Function<? super T, ? extends V> function) - Specified by:
toSortedBagBy
in interfaceParallelIterable<T>
-
toSortedSet
- Specified by:
toSortedSet
in interfaceParallelIterable<T>
-
toMap
public <NK,NV> MutableMap<NK,NV> toMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction) - Specified by:
toMap
in interfaceParallelIterable<T>
-
toSortedMap
public <NK,NV> MutableSortedMap<NK,NV> toSortedMap(Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction) - Specified by:
toSortedMap
in interfaceParallelIterable<T>
-
toSortedMap
public <NK,NV> MutableSortedMap<NK,NV> toSortedMap(Comparator<? super NK> comparator, Function<? super T, ? extends NK> keyFunction, Function<? super T, ? extends NV> valueFunction) - Specified by:
toSortedMap
in interfaceParallelIterable<T>
-
aggregateBy
public <K,V> MapIterable<K,V> aggregateBy(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V, ? super T, ? extends V> nonMutatingAggregator) - Specified by:
aggregateBy
in interfaceParallelIterable<T>
-
aggregateInPlaceBy
public <K,V> MapIterable<K,V> aggregateInPlaceBy(Function<? super T, ? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V, ? super T> mutatingAggregator) - Specified by:
aggregateInPlaceBy
in interfaceParallelIterable<T>
-
count
- Specified by:
count
in interfaceParallelIterable<T>
-
countWith
- Specified by:
countWith
in interfaceParallelIterable<T>
-
min
- Specified by:
min
in interfaceParallelIterable<T>
-
max
- Specified by:
max
in interfaceParallelIterable<T>
-
min
- Specified by:
min
in interfaceParallelIterable<T>
-
max
- Specified by:
max
in interfaceParallelIterable<T>
-
minBy
- Specified by:
minBy
in interfaceParallelIterable<T>
-
maxBy
- Specified by:
maxBy
in interfaceParallelIterable<T>
-
sumOfInt
Description copied from interface:ParallelIterable
Returns the final long result of evaluating function for each element of the iterable in parallel and adding the results together.- Specified by:
sumOfInt
in interfaceParallelIterable<T>
-
sumOfFloat
Description copied from interface:ParallelIterable
Returns the final double result of evaluating function for each element of the iterable in parallel and adding the results together. It uses Kahan summation algorithm to reduce numerical error.- Specified by:
sumOfFloat
in interfaceParallelIterable<T>
-
sumOfLong
Description copied from interface:ParallelIterable
Returns the final long result of evaluating function for each element of the iterable in parallel and adding the results together.- Specified by:
sumOfLong
in interfaceParallelIterable<T>
-
sumOfDouble
Description copied from interface:ParallelIterable
Returns the final double result of evaluating function for each element of the iterable in parallel and adding the results together. It uses Kahan summation algorithm to reduce numerical error.- Specified by:
sumOfDouble
in interfaceParallelIterable<T>
-
groupByUniqueKey
- Specified by:
groupByUniqueKey
in interfaceParallelIterable<T>
-