|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.extra166y.AbstractParallelAnyArray.OPap groovyx.gpars.extra166y.ParallelArrayWithMapping groovyx.gpars.extra166y.ParallelArrayWithFilter
public abstract class ParallelArrayWithFilter extends ParallelArrayWithMapping
A prefix view of ParallelArray that causes operations to apply only to elements for which a selector returns true. Instances of this class may be constructed only via prefix methods of ParallelArray or its other prefix classes.
Constructor Summary | |
ParallelArrayWithFilter(ForkJoinPool ex, int origin, int fence, java.lang.Object[] array)
|
Method Summary | |
---|---|
ParallelArray
|
allNonidenticalElements()
Returns a new ParallelArray containing only non-null unique elements (that is, without any duplicates). |
ParallelArray
|
allUniqueElements()
Returns a new ParallelArray containing only non-null unique elements (that is, without any duplicates). |
boolean
|
hasAllEqualElements(ParallelArrayWithMapping other)
Returns true if all elements at the same relative positions of this and other array are equal. |
boolean
|
hasAllIdenticalElements(ParallelArrayWithMapping other)
Returns true if all elements at the same relative positions of this and other array are identical. |
void
|
leafTransfer(int lo, int hi, java.lang.Object[] dest, int offset)
|
void
|
leafTransferByIndex(int[] indices, int loIdx, int hiIdx, java.lang.Object[] dest, int offset)
|
java.lang.Object
|
oget(int i)
|
ParallelArrayWithFilter
|
replaceWithGeneratedValue(Generator generator)
Replaces elements with results of applying the given generator. |
ParallelArrayWithFilter
|
replaceWithMappedIndex(IntToObject op)
Replaces elements with the results of applying the given op to their indices. |
ParallelArrayWithFilter
|
replaceWithMappedIndex(IntAndObjectToObject op)
Replaces elements with the results of applying the given mapping to each index and current element value. |
ParallelArrayWithFilter
|
replaceWithMapping(Op op)
Replaces elements with the results of applying the given op to their current values. |
ParallelArrayWithFilter
|
replaceWithMapping(BinaryOp combiner, ParallelArrayWithMapping other)
Replaces elements with results of applying
|
ParallelArrayWithFilter
|
replaceWithMapping(BinaryOp combiner, java.lang.Object[] other)
Replaces elements with results of applying
|
ParallelArrayWithFilter
|
replaceWithValue(java.lang.Object value)
Replaces elements with the given value. |
ParallelArrayWithFilter
|
withFilter(Predicate 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. |
ParallelArrayWithFilter
|
withFilter(BinaryPredicate selector, ParallelArrayWithMapping other)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given binary selector returns true. |
ParallelArrayWithFilter
|
withIndexedFilter(IntAndObjectPredicate selector)
Returns an operation prefix that causes a method to operate only on elements for which the current selector (if present) and the given indexed selector returns true. |
Methods inherited from class ParallelArrayWithMapping | |
---|---|
all, all, any, apply, max, max, min, min, reduce, sequentially, summary, summary, withIndexedMapping, withIndexedMapping, withIndexedMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping |
Constructor Detail |
---|
ParallelArrayWithFilter(ForkJoinPool ex, int origin, int fence, java.lang.Object[] array)
Method Detail |
---|
public ParallelArray allNonidenticalElements()
public ParallelArray allUniqueElements()
equals
method to test for
duplication.
public boolean hasAllEqualElements(ParallelArrayWithMapping other)
other
- the other array
public boolean hasAllIdenticalElements(ParallelArrayWithMapping other)
other
- the other array
final void leafTransfer(int lo, int hi, java.lang.Object[] dest, int offset)
final void leafTransferByIndex(int[] indices, int loIdx, int hiIdx, java.lang.Object[] dest, int offset)
final java.lang.Object oget(int i)
public ParallelArrayWithFilter replaceWithGeneratedValue(Generator generator)
generator
- the generator
public ParallelArrayWithFilter replaceWithMappedIndex(IntToObject op)
op
- the op
public ParallelArrayWithFilter replaceWithMappedIndex(IntAndObjectToObject op)
op
- the op
public ParallelArrayWithFilter replaceWithMapping(Op op)
op
- the op
public ParallelArrayWithFilter replaceWithMapping(BinaryOp combiner, ParallelArrayWithMapping other)
op(thisElement, otherElement)
.
other
- the other arraycombiner
- the combiner
public ParallelArrayWithFilter replaceWithMapping(BinaryOp combiner, java.lang.Object[] other)
op(thisElement, otherElement)
.
other
- the other arraycombiner
- the combiner
public ParallelArrayWithFilter replaceWithValue(java.lang.Object value)
value
- the value
public ParallelArrayWithFilter withFilter(Predicate selector)
selector
- the selector
public ParallelArrayWithFilter withFilter(BinaryPredicate selector, ParallelArrayWithMapping other)
selector
- the selector
public ParallelArrayWithFilter withIndexedFilter(IntAndObjectPredicate selector)
selector
- the selector
Copyright © 2008–2013 Václav Pech. All Rights Reserved.