Package extra166y
Class ParallelLongArrayWithFilter
- java.lang.Object
-
- extra166y.AbstractParallelAnyArray
-
- extra166y.ParallelLongArrayWithLongMapping
-
- extra166y.ParallelLongArrayWithFilter
-
- Direct Known Subclasses:
ParallelLongArrayWithBounds
public abstract class ParallelLongArrayWithFilter extends ParallelLongArrayWithLongMapping
A prefix view of ParallelLongArray 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 ParallelLongArray or its other prefix classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ParallelLongArrayallUniqueElements()Returns a new ParallelLongArray containing only unique elements (that is, without any duplicates).booleanhasAllEqualElements(ParallelLongArrayWithLongMapping other)Returns true if all elements at the same relative positions of this and other array are equal.ParallelLongArrayWithFilterreplaceWithGeneratedValue(Ops.LongGenerator generator)Replaces elements with results of applying the given generator.ParallelLongArrayWithFilterreplaceWithMappedIndex(Ops.IntAndLongToLong op)Replaces elements with the results of applying the given mapping to each index and current element value.ParallelLongArrayWithFilterreplaceWithMappedIndex(Ops.IntToLong op)Replaces elements with the results of applying the given op to their indices.ParallelLongArrayWithFilterreplaceWithMapping(Ops.BinaryLongOp combiner, long[] other)Replaces elements with results of applying op(thisElement, otherElement).ParallelLongArrayWithFilterreplaceWithMapping(Ops.BinaryLongOp combiner, ParallelLongArrayWithLongMapping other)Replaces elements with results of applying op(thisElement, otherElement).ParallelLongArrayWithFilterreplaceWithMapping(Ops.LongOp op)Replaces elements with the results of applying the given op to their current values.ParallelLongArrayWithFilterreplaceWithValue(long value)Replaces elements with the given value.ParallelLongArrayWithFilterwithFilter(Ops.BinaryLongPredicate selector, ParallelLongArrayWithLongMapping 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 ParallelLongArrayWithFilterwithFilter(Ops.LongPredicate 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 ParallelLongArrayWithFilterwithIndexedFilter(Ops.IntAndLongPredicate 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 extra166y.ParallelLongArrayWithLongMapping
all, apply, max, max, min, min, reduce, sequentially, sum, summary, summary, withIndexedMapping, withIndexedMapping, withIndexedMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping, withMapping
-
Methods inherited from class extra166y.AbstractParallelAnyArray
anyIndex, isEmpty, size
-
-
-
-
Method Detail
-
replaceWithMapping
public ParallelLongArrayWithFilter replaceWithMapping(Ops.LongOp op)
Replaces elements with the results of applying the given op to their current values.- Parameters:
op- the op- Returns:
- this (to simplify use in expressions)
-
replaceWithMappedIndex
public ParallelLongArrayWithFilter replaceWithMappedIndex(Ops.IntToLong op)
Replaces elements with the results of applying the given op to their indices.- Parameters:
op- the op- Returns:
- this (to simplify use in expressions)
-
replaceWithMappedIndex
public ParallelLongArrayWithFilter replaceWithMappedIndex(Ops.IntAndLongToLong op)
Replaces elements with the results of applying the given mapping to each index and current element value.- Parameters:
op- the op- Returns:
- this (to simplify use in expressions)
-
replaceWithGeneratedValue
public ParallelLongArrayWithFilter replaceWithGeneratedValue(Ops.LongGenerator generator)
Replaces elements with results of applying the given generator.- Parameters:
generator- the generator- Returns:
- this (to simplify use in expressions)
-
replaceWithValue
public ParallelLongArrayWithFilter replaceWithValue(long value)
Replaces elements with the given value.- Parameters:
value- the value- Returns:
- this (to simplify use in expressions)
-
replaceWithMapping
public ParallelLongArrayWithFilter replaceWithMapping(Ops.BinaryLongOp combiner, ParallelLongArrayWithLongMapping other)
Replaces elements with results of applying op(thisElement, otherElement).- Parameters:
other- the other arraycombiner- the combiner- Returns:
- this (to simplify use in expressions)
-
replaceWithMapping
public ParallelLongArrayWithFilter replaceWithMapping(Ops.BinaryLongOp combiner, long[] other)
Replaces elements with results of applying op(thisElement, otherElement).- Parameters:
other- the other arraycombiner- the combiner- Returns:
- this (to simplify use in expressions)
-
allUniqueElements
public ParallelLongArray allUniqueElements()
Returns a new ParallelLongArray containing only unique elements (that is, without any duplicates).- Returns:
- the new ParallelLongArray
-
withFilter
public abstract ParallelLongArrayWithFilter withFilter(Ops.LongPredicate 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.- Parameters:
selector- the selector- Returns:
- operation prefix
-
withFilter
public ParallelLongArrayWithFilter withFilter(Ops.BinaryLongPredicate selector, ParallelLongArrayWithLongMapping 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.- Parameters:
selector- the selector- Returns:
- operation prefix
-
withIndexedFilter
public abstract ParallelLongArrayWithFilter withIndexedFilter(Ops.IntAndLongPredicate 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.- Parameters:
selector- the selector- Returns:
- operation prefix
-
hasAllEqualElements
public boolean hasAllEqualElements(ParallelLongArrayWithLongMapping other)
Returns true if all elements at the same relative positions of this and other array are equal.- Parameters:
other- the other array- Returns:
- true if equal
-
-