|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgroovyx.gpars.extra166y.AbstractParallelAnyArray
groovyx.gpars.extra166y.AbstractParallelAnyArray.OPap<T>
groovyx.gpars.extra166y.ParallelArrayWithMapping<T,T>
groovyx.gpars.extra166y.ParallelArrayWithFilter<T>
public abstract class ParallelArrayWithFilter<T>
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.
| Nested Class Summary |
|---|
| Field Summary |
|---|
| Fields inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray.OPap |
|---|
array |
| Fields inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray |
|---|
ex, fence, origin, threshold |
| Constructor Summary | |
|---|---|
ParallelArrayWithFilter(jsr166y.ForkJoinPool ex,
int origin,
int fence,
T[] array)
|
|
| Method Summary | ||
|---|---|---|
ParallelArray<T> |
allNonidenticalElements()
Returns a new ParallelArray containing only non-null unique elements (that is, without any duplicates). |
|
ParallelArray<T> |
allUniqueElements()
Returns a new ParallelArray containing only non-null unique elements (that is, without any duplicates). |
|
|
hasAllEqualElements(ParallelArrayWithMapping<U,V> other)
Returns true if all elements at the same relative positions of this and other array are equal. |
|
|
hasAllIdenticalElements(ParallelArrayWithMapping<U,V> other)
Returns true if all elements at the same relative positions of this and other array are identical. |
|
(package private) void |
leafTransfer(int lo,
int hi,
java.lang.Object[] dest,
int offset)
|
|
(package private) void |
leafTransferByIndex(int[] indices,
int loIdx,
int hiIdx,
java.lang.Object[] dest,
int offset)
|
|
(package private) java.lang.Object |
oget(int i)
|
|
ParallelArrayWithFilter<T> |
replaceWithGeneratedValue(Ops.Generator<? extends T> generator)
Replaces elements with results of applying the given generator. |
|
ParallelArrayWithFilter<T> |
replaceWithMappedIndex(Ops.IntAndObjectToObject<? super T,? extends T> op)
Replaces elements with the results of applying the given mapping to each index and current element value |
|
ParallelArrayWithFilter<T> |
replaceWithMappedIndex(Ops.IntToObject<? extends T> op)
Replaces elements with the results of applying the given op to their indices |
|
|
replaceWithMapping(Ops.BinaryOp<? super T,? super V,? extends T> combiner,
ParallelArrayWithMapping<W,V> other)
Replaces elements with results of applying op(thisElement, otherElement) |
|
ParallelArrayWithFilter<T> |
replaceWithMapping(Ops.BinaryOp<T,T,T> combiner,
T[] other)
Replaces elements with results of applying op(thisElement, otherElement) |
|
ParallelArrayWithFilter<T> |
replaceWithMapping(Ops.Op<? super T,? extends T> op)
Replaces elements with the results of applying the given op to their current values. |
|
ParallelArrayWithFilter<T> |
replaceWithValue(T value)
Replaces elements with the given value. |
|
|
withFilter(Ops.BinaryPredicate<? super T,? super V> selector,
ParallelArrayWithMapping<W,V> 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 |
|
abstract ParallelArrayWithFilter<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 |
|
abstract ParallelArrayWithFilter<T> |
withIndexedFilter(Ops.IntAndObjectPredicate<? 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 indexed selector returns true |
|
| Methods inherited from class groovyx.gpars.extra166y.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 |
| Methods inherited from class groovyx.gpars.extra166y.AbstractParallelAnyArray.OPap |
|---|
dget, leafMoveByIndex, leafMoveSelected, lget, ogetArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
ParallelArrayWithFilter(jsr166y.ForkJoinPool ex,
int origin,
int fence,
T[] array)
| Method Detail |
|---|
public ParallelArrayWithFilter<T> replaceWithMapping(Ops.Op<? super T,? extends T> op)
op - the op
public ParallelArrayWithFilter<T> replaceWithMappedIndex(Ops.IntToObject<? extends T> op)
op - the op
public ParallelArrayWithFilter<T> replaceWithMappedIndex(Ops.IntAndObjectToObject<? super T,? extends T> op)
op - the op
public ParallelArrayWithFilter<T> replaceWithGeneratedValue(Ops.Generator<? extends T> generator)
generator - the generator
public ParallelArrayWithFilter<T> replaceWithValue(T value)
value - the value
public <V,W> ParallelArrayWithFilter<T> replaceWithMapping(Ops.BinaryOp<? super T,? super V,? extends T> combiner,
ParallelArrayWithMapping<W,V> other)
other - the other arraycombiner - the combiner
public ParallelArrayWithFilter<T> replaceWithMapping(Ops.BinaryOp<T,T,T> combiner,
T[] other)
other - the other arraycombiner - the combiner
public ParallelArray<T> allUniqueElements()
public ParallelArray<T> allNonidenticalElements()
public abstract ParallelArrayWithFilter<T> withFilter(Ops.Predicate<? super T> selector)
selector - the selector
public <V,W> ParallelArrayWithFilter<T> withFilter(Ops.BinaryPredicate<? super T,? super V> selector,
ParallelArrayWithMapping<W,V> other)
selector - the selector
public abstract ParallelArrayWithFilter<T> withIndexedFilter(Ops.IntAndObjectPredicate<? super T> selector)
selector - the selector
public <U,V> boolean hasAllEqualElements(ParallelArrayWithMapping<U,V> other)
other - the other array
public <U,V> boolean hasAllIdenticalElements(ParallelArrayWithMapping<U,V> other)
other - the other array
final void leafTransfer(int lo,
int hi,
java.lang.Object[] dest,
int offset)
leafTransfer in class AbstractParallelAnyArray
final void leafTransferByIndex(int[] indices,
int loIdx,
int hiIdx,
java.lang.Object[] dest,
int offset)
leafTransferByIndex in class AbstractParallelAnyArrayfinal java.lang.Object oget(int i)
oget in class AbstractParallelAnyArray
|
Copyright © 2008–2012 Václav Pech. All Rights Reserved. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||