|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsr166z.forkjoin.ParallelLongArray.WithLongMapping jsr166z.forkjoin.ParallelLongArray.WithFilter
public abstract static class ParallelLongArray.WithFilter
A restriction of parallel array operations to apply only to elements for which a selector returns true
Method Summary | ||
---|---|---|
long |
any()
Returns some element matching bound and filter constraints |
|
void |
apply({long=>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({long,long=>int} 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({long,long=>int} comparator)
Returns the index corresponding to the least element or -1 if empty |
|
long |
max()
Returns the maximum element, or Long.MIN_VALUE if empty assuming that all elements are Comparables |
|
long |
max({long,long=>int} comparator)
Returns the maximum element, or Long.MIN_VALUE if empty |
|
long |
min()
Returns the minimum element, or Long.MAX_VALUE if empty, assuming that all elements are Comparables |
|
long |
min({long,long=>int} comparator)
Returns the minimum element, or Long.MAX_VALUE if empty |
|
abstract ParallelLongArray |
newArray()
Returns a new ParallelArray holding elements |
|
void |
randomFill()
Sets each element to a uniform random value having the same properties as Random.nextLong() |
|
void |
randomFill(long bound)
Sets each element to a uniform random value having the same properties as Random.nextInt(int) |
|
long |
reduce({long,long=>long} reducer,
long base)
Returns reduction of elements |
|
void |
replaceWithCombination(long[] other,
{long,long=>long} combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
|
void |
replaceWithCombination(ParallelLongArray other,
{long,long=>long} combiner)
Replaces elements with results of applying combine(thisElement, otherElement) |
|
void |
replaceWithGeneratedValue({=>long} generator)
Replaces elements with results of applying the given generator. |
|
void |
replaceWithMappedIndex({int=>long} mapper)
Replaces elements with the results of applying the given mapper to their indices |
|
void |
replaceWithTransform({long=>long} mapper)
Replaces elements with the results of applying the given mapper to their current values. |
|
void |
replaceWithValue(long value)
Replaces elements with the given value. |
|
long |
sum()
Returns the sum of elements |
|
abstract ParallelLongArray.WithDoubleMapping |
withMapping({long=>double} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract ParallelLongArray.WithIntMapping |
withMapping({long=>int} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract ParallelLongArray.WithLongMapping |
withMapping({long=>long} mapper)
Returns an operation prefix that causes a method to operate on mapped elements of the array using the given mapper. |
|
abstract
|
withMapping({long=>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.ParallelLongArray.WithLongMapping |
---|
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({long=>void} procedure)
apply
in class ParallelLongArray.WithLongMapping
procedure
- the procedurepublic long reduce({long,long=>long} reducer, long base)
reduce
in class ParallelLongArray.WithLongMapping
reducer
- the reducerbase
- the result for an empty array
public long sum()
sum
in class ParallelLongArray.WithLongMapping
public long min({long,long=>int} comparator)
min
in class ParallelLongArray.WithLongMapping
comparator
- the comparator
public long min()
min
in class ParallelLongArray.WithLongMapping
public long max({long,long=>int} comparator)
max
in class ParallelLongArray.WithLongMapping
comparator
- the comparator
public long max()
max
in class ParallelLongArray.WithLongMapping
public int indexOfMin({long,long=>int} comparator)
indexOfMin
in class ParallelLongArray.WithLongMapping
comparator
- the comparator
public int indexOfMax({long,long=>int} comparator)
indexOfMax
in class ParallelLongArray.WithLongMapping
comparator
- the comparator
public int indexOfMin()
indexOfMin
in class ParallelLongArray.WithLongMapping
java.lang.ClassCastException
- if any element is not Comparable.public int indexOfMax()
indexOfMax
in class ParallelLongArray.WithLongMapping
java.lang.ClassCastException
- if any element is not Comparable.public abstract ParallelLongArray newArray()
newArray
in class ParallelLongArray.WithLongMapping
public void replaceWithTransform({long=>long} mapper)
mapper
- the mapperpublic void replaceWithMappedIndex({int=>long} mapper)
mapper
- the mapperpublic void replaceWithGeneratedValue({=>long} generator)
generator
- the generatorpublic void randomFill()
Random.nextLong()
public void randomFill(long bound)
Random.nextInt(int)
bound
- the upper bound of each random value
java.lang.IllegalArgumentException
- if bound less than or
equal to zeropublic void replaceWithValue(long value)
value
- the valuepublic void replaceWithCombination(ParallelLongArray other, {long,long=>long} combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array has
fewer than upperBound elements.public void replaceWithCombination(long[] other, {long,long=>long} combiner)
other
- the other arraycombiner
- the combiner
java.lang.ArrayIndexOutOfBoundsException
- if other array has
fewer than upperBound elements.public long any()
any
in class ParallelLongArray.WithLongMapping
java.util.NoSuchElementException
- if emptypublic abstract <U> ParallelLongArray.WithMapping<U> withMapping({long=>U} mapper)
mapper
- the mapper
public abstract ParallelLongArray.WithDoubleMapping withMapping({long=>double} mapper)
mapper
- the mapper
public abstract ParallelLongArray.WithLongMapping withMapping({long=>long} mapper)
mapper
- the mapper
public abstract ParallelLongArray.WithIntMapping withMapping({long=>int} mapper)
mapper
- the mapper
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |