|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsr166y.forkjoin.ParallelArray.WithMapping<T,T>
jsr166y.forkjoin.ParallelArray.WithFilter<T>
public abstract static class ParallelArray.WithFilter<T>
A restriction of parallel array operations to apply only to elements for which a selector returns true
Method Summary | |
---|---|
abstract ParallelArray<T> |
allNonidenticalElements()
Returns a new ParallelArray containing only non-null unique elements (that is, without any duplicates). |
abstract ParallelArray<T> |
allUniqueElements()
Returns a new ParallelArray containing only non-null unique elements (that is, without any duplicates). |
void |
apply(Ops.Procedure<? super T> procedure)
Applies the given procedure to elements |
T |
max()
Returns the maximum element, or null if empty assuming that all elements are Comparables |
T |
max(java.util.Comparator<? super T> comparator)
Returns the maximum element, or null if empty |
T |
min()
Returns the minimum element, or null if empty, assuming that all elements are Comparables |
T |
min(java.util.Comparator<? super T> comparator)
Returns the minimum element, or null if empty |
abstract ParallelArray.WithFilter<T> |
orFilter(Ops.Predicate<? super T> selector)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) or the given selector returns true |
T |
reduce(Ops.Reducer<T> reducer,
T base)
Returns reduction of elements |
abstract void |
removeAll()
Removes from the array all elements matching bound and/or filter constraints. |
void |
replaceWithCombination(ParallelArray.WithBounds<? extends T> other,
Ops.Reducer<T> combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
void |
replaceWithCombination(ParallelArray<? extends T> other,
Ops.Reducer<T> combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
void |
replaceWithCombination(T[] other,
Ops.Reducer<T> combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
void |
replaceWithGeneratedValue(Ops.Generator<? extends T> generator)
Replaces elements with results of applying the given generator. |
void |
replaceWithMappedIndex(Ops.MapperFromInt<? extends T> mapper)
Replaces elements with the results of applying the given mapper to their indices |
void |
replaceWithTransform(Ops.Mapper<? super T,? extends T> mapper)
Replaces elements with the results of applying the given mapper to their current values. |
void |
replaceWithValue(T value)
Replaces elements with the given value. |
ParallelArray.SummaryStatistics<T> |
summary()
Returns summary statistics, assuming that all elements are Comparables |
ParallelArray.SummaryStatistics<T> |
summary(java.util.Comparator<? super T> comparator)
Returns summary statistics, using the given comparator to locate minimum and maximum elements. |
abstract ParallelArray.WithFilter<T> |
withFilter(Ops.Predicate<? super T> selector)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given selector returns true |
Methods inherited from class jsr166y.forkjoin.ParallelArray.WithMapping |
---|
all, all, any, anyIndex, size, withMapping, withMapping, withMapping |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void apply(Ops.Procedure<? super T> procedure)
ParallelArray.WithMapping
apply
in class ParallelArray.WithMapping<T,T>
procedure
- the procedurepublic T reduce(Ops.Reducer<T> reducer, T base)
ParallelArray.WithMapping
reduce
in class ParallelArray.WithMapping<T,T>
reducer
- the reducerbase
- the result for an empty array
public T min(java.util.Comparator<? super T> comparator)
ParallelArray.WithMapping
min
in class ParallelArray.WithMapping<T,T>
comparator
- the comparator
public T min()
ParallelArray.WithMapping
min
in class ParallelArray.WithMapping<T,T>
public T max(java.util.Comparator<? super T> comparator)
ParallelArray.WithMapping
max
in class ParallelArray.WithMapping<T,T>
comparator
- the comparator
public T max()
ParallelArray.WithMapping
max
in class ParallelArray.WithMapping<T,T>
public ParallelArray.SummaryStatistics<T> summary(java.util.Comparator<? super T> comparator)
ParallelArray.WithMapping
summary
in class ParallelArray.WithMapping<T,T>
comparator
- the comparator to use for
locating minimum and maximum elements
public ParallelArray.SummaryStatistics<T> summary()
ParallelArray.WithMapping
summary
in class ParallelArray.WithMapping<T,T>
public void replaceWithTransform(Ops.Mapper<? super T,? extends T> mapper)
mapper
- the mapperpublic void replaceWithMappedIndex(Ops.MapperFromInt<? extends T> mapper)
mapper
- the mapperpublic void replaceWithGeneratedValue(Ops.Generator<? extends T> generator)
generator
- the generatorpublic void replaceWithValue(T value)
value
- the valuepublic void replaceWithCombination(ParallelArray<? extends T> other, Ops.Reducer<T> combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array has
fewer than upperBound elements.public void replaceWithCombination(ParallelArray.WithBounds<? extends T> other, Ops.Reducer<T> combiner)
other
- the other array segmentcombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array has
fewer than upperBound elements.public void replaceWithCombination(T[] other, Ops.Reducer<T> combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array has
fewer than upperBound elements.public abstract void removeAll()
public abstract ParallelArray<T> allUniqueElements()
public abstract ParallelArray<T> allNonidenticalElements()
public abstract ParallelArray.WithFilter<T> withFilter(Ops.Predicate<? super T> selector)
selector
- the selector
public abstract ParallelArray.WithFilter<T> orFilter(Ops.Predicate<? super T> selector)
selector
- the selector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |