|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjsr166z.forkjoin.ParallelArray.WithMapping<T,T>
jsr166z.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 T |
any()
Returns some element matching bound and filter constraints, or null if none. |
|
void |
apply({T=>void} procedure)
Applies the given procedure |
|
int |
indexOfMax()
Returns the index corresponding to the greatest element or -1 if empty, assuming that all elements are Comparables |
|
int |
indexOfMax(java.util.Comparator<? super T> comparator)
Returns the index corresponding to the greatest element, or -1 if empty |
|
int |
indexOfMin()
Returns the index corresponding to the least element or -1 if empty, assuming that all elements are Comparables |
|
int |
indexOfMin(java.util.Comparator<? super T> comparator)
Returns the index corresponding to the least element or -1 if empty |
|
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<T> |
newArray()
Returns a new ParallelArray holding elements |
|
abstract ParallelArray<T> |
newArray(java.lang.Class<? super T> elementType)
Returns a new ParallelArray with the given element type holding elements |
|
T |
reduce({T,T=>T} reducer,
T base)
Returns reduction of elements |
|
void |
replaceWithCombination(ParallelArray<? extends T> other,
{T,T=>T} combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
|
void |
replaceWithCombination(T[] other,
{T,T=>T} combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
|
void |
replaceWithGeneratedValue({=>T} generator)
Replaces elements with results of applying the given generator. |
|
void |
replaceWithMappedIndex({int=>T} mapper)
Replaces elements with the results of applying the given mapper to their indices |
|
void |
replaceWithTransform({T=>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. |
|
abstract ParallelArray.WithDoubleMapping<T> |
withMapping({T=>double} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract ParallelArray.WithIntMapping<T> |
withMapping({T=>int} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract ParallelArray.WithLongMapping<T> |
withMapping({T=>long} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract
|
withMapping({T=>U} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
| Methods inherited from class jsr166z.forkjoin.ParallelArray.WithMapping |
|---|
anyIndex, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void apply({T=>void} procedure)
apply in class ParallelArray.WithMapping<T,T>procedure - the procedure
public T reduce({T,T=>T} reducer,
T base)
reduce in class ParallelArray.WithMapping<T,T>reducer - the reducerbase - the result for an empty array
public abstract T any()
any in class ParallelArray.WithMapping<T,T>public T min(java.util.Comparator<? super T> comparator)
min in class ParallelArray.WithMapping<T,T>comparator - the comparator
public T min()
min in class ParallelArray.WithMapping<T,T>java.lang.ClassCastException - if any element is not Comparable.public T max(java.util.Comparator<? super T> comparator)
max in class ParallelArray.WithMapping<T,T>comparator - the comparator
public T max()
max in class ParallelArray.WithMapping<T,T>java.lang.ClassCastException - if any element is not Comparable.public int indexOfMin(java.util.Comparator<? super T> comparator)
indexOfMin in class ParallelArray.WithMapping<T,T>comparator - the comparator
public int indexOfMax(java.util.Comparator<? super T> comparator)
indexOfMax in class ParallelArray.WithMapping<T,T>comparator - the comparator
public int indexOfMin()
indexOfMin in class ParallelArray.WithMapping<T,T>java.lang.ClassCastException - if any element is not Comparable.public int indexOfMax()
indexOfMax in class ParallelArray.WithMapping<T,T>java.lang.ClassCastException - if any element is not Comparable.public abstract ParallelArray<T> newArray()
newArray in class ParallelArray.WithMapping<T,T>public abstract ParallelArray<T> newArray(java.lang.Class<? super T> elementType)
newArray in class ParallelArray.WithMapping<T,T>elementType - the type of the elements
public void replaceWithTransform({T=>T} mapper)
mapper - the mapper
public void replaceWithMappedIndex({int=>T} mapper)
mapper - the mapper
public void replaceWithGeneratedValue({=>T} generator)
generator - the generatorpublic void replaceWithValue(T value)
value - the value
public void replaceWithCombination(ParallelArray<? extends T> other,
{T,T=>T} combiner)
other - the other arraycombiner - the combiner
java.lang.ArrayIndexOutOfBoundsException - if other array has
fewer than upperBound elements.
public void replaceWithCombination(T[] other,
{T,T=>T} combiner)
other - the other arraycombiner - the combiner
java.lang.ArrayIndexOutOfBoundsException - if other array has
fewer than upperBound elements.
public abstract <U> ParallelArray.WithMapping<T,U> withMapping({T=>U} mapper)
withMapping in class ParallelArray.WithMapping<T,T>mapper - the mapper
public abstract ParallelArray.WithDoubleMapping<T> withMapping({T=>double} mapper)
mapper - the mapper
public abstract ParallelArray.WithLongMapping<T> withMapping({T=>long} mapper)
mapper - the mapper
public abstract ParallelArray.WithIntMapping<T> withMapping({T=>int} mapper)
mapper - the mapper
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||