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 and description |
---|
ParallelArrayWithFilter
(java.util.concurrent.ForkJoinPool ex, int origin, int fence, T[] array) |
Type | Name and description |
---|---|
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). |
boolean |
hasAllEqualElements(ParallelArrayWithMapping<U, V> other) Returns true if all elements at the same relative positions of this and other array are equal. |
boolean |
hasAllIdenticalElements(ParallelArrayWithMapping<U, V> 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<T> |
replaceWithGeneratedValue(Generator<? extends T> generator) Replaces elements with results of applying the given generator. |
ParallelArrayWithFilter<T> |
replaceWithMappedIndex(IntToObject<? extends T> op) Replaces elements with the results of applying the given op to their indices. |
ParallelArrayWithFilter<T> |
replaceWithMappedIndex(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> |
replaceWithMapping(Op<? super T, ? extends T> op) Replaces elements with the results of applying the given op to their current values. |
ParallelArrayWithFilter<T> |
replaceWithMapping(BinaryOp<? super T, ? super V, ? extends T> combiner, ParallelArrayWithMapping<W, V> other) Replaces elements with results of applying op(thisElement, otherElement) . |
ParallelArrayWithFilter<T> |
replaceWithMapping(BinaryOp<T, T, T> combiner, T[] other) Replaces elements with results of applying op(thisElement, otherElement) . |
ParallelArrayWithFilter<T> |
replaceWithValue(T value) Replaces elements with the given value. |
ParallelArrayWithFilter<T> |
withFilter(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. |
ParallelArrayWithFilter<T> |
withFilter(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. |
ParallelArrayWithFilter<T> |
withIndexedFilter(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 | Name |
---|---|
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 |
Returns a new ParallelArray containing only non-null unique elements (that is, without any duplicates). This method uses reference identity to test for duplication.
Returns a new ParallelArray containing only non-null unique
elements (that is, without any duplicates). This method
uses each element's equals
method to test for
duplication.
Returns true if all elements at the same relative positions of this and other array are equal.
other
- the other arrayReturns true if all elements at the same relative positions of this and other array are identical.
other
- the other arrayReplaces elements with results of applying the given generator.
generator
- the generatorReplaces elements with the results of applying the given op to their indices.
op
- the opReplaces elements with the results of applying the given mapping to each index and current element value.
op
- the opReplaces elements with the results of applying the given op to their current values.
op
- the op Replaces elements with results of applying
op(thisElement, otherElement)
.
other
- the other arraycombiner
- the combiner Replaces elements with results of applying
op(thisElement, otherElement)
.
other
- the other arraycombiner
- the combinerReplaces elements with the given value.
value
- the valueReturns 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.
selector
- the selectorReturns 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.
selector
- the selectorReturns 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.
selector
- the selectorCopyright © 2008–2014 Václav Pech. All Rights Reserved.