|
||||||||
| 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>
jsr166z.forkjoin.ParallelArray.WithBounds<T>
public static final class ParallelArray.WithBounds<T>
A restriction of parallel array operations to apply only within a given range of indices.
| Method Summary | ||
|---|---|---|
T |
any()
Returns some element matching bound constraints, or null if none. |
|
int |
anyIndex()
Returns the index of some element matching bound filter constraints, or -1 if none. |
|
|
combine(ParallelArray<U> other,
{T,U=>V} combiner)
Returns a ParallelArray containing results of applying combine(thisElement, otherElement) for each element. |
|
|
combine(ParallelArray<U> other,
{T,U=>V} combiner,
java.lang.Class<? super V> elementType)
Returns a ParallelArray containing results of applying combine(thisElement, otherElement) for each element. |
|
|
combine(U[] other,
{T,U=>V} combiner)
Returns a ParallelArray containing results of applying combine(thisElement, otherElement) for each element. |
|
|
combine(U[] other,
{T,U=>V} combiner,
java.lang.Class<? super V> elementType)
Returns a ParallelArray containing results of applying combine(thisElement, otherElement) for each element. |
|
void |
cumulate({T,T=>T} reducer,
T base)
Replaces each element with the running cumulation of applying the given reducer. |
|
ParallelArray<T> |
newArray()
Returns a new ParallelArray holding elements |
|
ParallelArray<T> |
newArray(java.lang.Class<? super T> elementType)
Returns a new ParallelArray with the given element type holding elements |
|
T |
precumulate({T,T=>T} reducer,
T base)
Replaces each element with the cumulation of applying the given reducer to all previous values, and returns the total reduction. |
|
int |
size()
Returns the number of elements within bounds |
|
void |
sort()
Sorts the elements, assuming all elements are Comparable. |
|
void |
sort(java.util.Comparator<? super T> cmp)
Sorts the elements. |
|
ParallelArray.WithFilter<T> |
withFilter({T=>boolean} selector)
Returns an operation prefix that causes a method to operate only on the elements of the array for which the given selector returns true |
|
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. |
|
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. |
|
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. |
|
|
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.WithFilter |
|---|
apply, indexOfMax, indexOfMax, indexOfMin, indexOfMin, max, max, min, min, reduce, replaceWithCombination, replaceWithCombination, replaceWithGeneratedValue, replaceWithMappedIndex, replaceWithTransform, replaceWithValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ParallelArray.WithFilter<T> withFilter({T=>boolean} selector)
selector - the selector
public <U> ParallelArray.WithMapping<T,U> withMapping({T=>U} mapper)
withMapping in class ParallelArray.WithFilter<T>mapper - the mapper
public ParallelArray.WithDoubleMapping<T> withMapping({T=>double} mapper)
withMapping in class ParallelArray.WithFilter<T>mapper - the mapper
public ParallelArray.WithLongMapping<T> withMapping({T=>long} mapper)
withMapping in class ParallelArray.WithFilter<T>mapper - the mapper
public ParallelArray.WithIntMapping<T> withMapping({T=>int} mapper)
withMapping in class ParallelArray.WithFilter<T>mapper - the mapper
public int anyIndex()
anyIndex in class ParallelArray.WithMapping<T,T>public T any()
any in class ParallelArray.WithFilter<T>
public <U,V> ParallelArray<V> combine(U[] other,
{T,U=>V} combiner)
other - the other arraycombiner - the combiner
java.lang.ArrayIndexOutOfBoundsException - if other array is
shorter than this array.
public <U,V> ParallelArray<V> combine(U[] other,
{T,U=>V} combiner,
java.lang.Class<? super V> elementType)
other - the other arraycombiner - the combinerelementType - the type of elements of returned array
java.lang.ArrayIndexOutOfBoundsException - if other array is
shorter than this array.
public <U,V> ParallelArray<V> combine(ParallelArray<U> other,
{T,U=>V} combiner)
other - the other arraycombiner - the combiner
java.lang.ArrayIndexOutOfBoundsException - if other array is
shorter than this array.
public <U,V> ParallelArray<V> combine(ParallelArray<U> other,
{T,U=>V} combiner,
java.lang.Class<? super V> elementType)
other - the other arraycombiner - the combinerelementType - the type of elements of returned array
java.lang.ArrayIndexOutOfBoundsException - if other array is
shorter than this array.public ParallelArray<T> newArray()
newArray in class ParallelArray.WithFilter<T>public ParallelArray<T> newArray(java.lang.Class<? super T> elementType)
newArray in class ParallelArray.WithFilter<T>elementType - the type of the elements
public int size()
size in class ParallelArray.WithMapping<T,T>
public void cumulate({T,T=>T} reducer,
T base)
reducer - the reducerbase - the result for an empty array
public T precumulate({T,T=>T} reducer,
T base)
reducer - the reducerbase - the result for an empty array
public void sort(java.util.Comparator<? super T> cmp)
cmp - the comparator to usepublic void sort()
java.lang.ClassCastException - if any element is not Comparable.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||