jsr166y.forkjoin
public abstract static class ParallelDoubleArray.WithMapping<U> extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
abstract ParallelArray<U> |
all()
Returns a new ParallelArray holding elements
|
abstract ParallelArray<U> |
all(java.lang.Class<? super U> elementType)
Returns a new ParallelArray with the given element type holding
elements
|
abstract U |
any()
Returns mapping of some element matching bound and filter
constraints, or null if none.
|
abstract int |
anyIndex()
Returns the index of some element matching bound and filter
constraints, or -1 if none.
|
void |
apply(Ops.Procedure<? super U> procedure)
Applies the given procedure to mapped elements
|
U |
max()
Returns the maximum mapped element, or null if empty
assuming that all elements are Comparables
|
U |
max(java.util.Comparator<? super U> comparator)
Returns the maximum mapped element, or null if empty
|
U |
min()
Returns the minimum mapped element, or null if empty,
assuming that all elements are Comparables
|
U |
min(java.util.Comparator<? super U> comparator)
Returns the minimum mapped element, or null if empty
|
U |
reduce(Ops.Reducer<U> reducer,
U base)
Returns reduction of mapped elements
|
abstract int |
size()
Return the number of elements selected using bound or
filter restrictions.
|
ParallelArray.SummaryStatistics<U> |
summary()
Returns summary statistics, assuming that all elements are
Comparables
|
ParallelArray.SummaryStatistics<U> |
summary(java.util.Comparator<? super U> comparator)
Returns summary statistics, using the given comparator
to locate minimum and maximum elements.
|
abstract <V> ParallelDoubleArray.WithMapping<V> |
withMapping(Ops.Mapper<? super U,? extends V> mapper)
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper
applied to current mapper's results
|
abstract ParallelDoubleArray.WithDoubleMapping |
withMapping(Ops.MapperToDouble<? super U> mapper)
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper
applied to current mapper's results
|
abstract ParallelDoubleArray.WithLongMapping |
withMapping(Ops.MapperToLong<? super U> mapper)
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper
applied to current mapper's results
|
public void apply(Ops.Procedure<? super U> procedure)
procedure
- the procedurepublic U reduce(Ops.Reducer<U> reducer, U base)
reducer
- the reducerbase
- the result for an empty arraypublic abstract int anyIndex()
public abstract U any()
public U min(java.util.Comparator<? super U> comparator)
comparator
- the comparatorpublic U min()
java.lang.ClassCastException
- if any element is not Comparable.public U max(java.util.Comparator<? super U> comparator)
comparator
- the comparatorpublic U max()
java.lang.ClassCastException
- if any element is not Comparable.public ParallelArray.SummaryStatistics<U> summary(java.util.Comparator<? super U> comparator)
comparator
- the comparator to use for
locating minimum and maximum elementspublic ParallelArray.SummaryStatistics<U> summary()
public abstract ParallelArray<U> all()
public abstract ParallelArray<U> all(java.lang.Class<? super U> elementType)
elementType
- the type of the elementspublic abstract int size()
public abstract <V> ParallelDoubleArray.WithMapping<V> withMapping(Ops.Mapper<? super U,? extends V> mapper)
mapper
- the mapperpublic abstract ParallelDoubleArray.WithDoubleMapping withMapping(Ops.MapperToDouble<? super U> mapper)
mapper
- the mapperpublic abstract ParallelDoubleArray.WithLongMapping withMapping(Ops.MapperToLong<? super U> mapper)
mapper
- the mapper