Interface RealLocalizableSpliterator<T>
- Type Parameters:
T- pixel type
- All Superinterfaces:
EuclideanSpace, RealLocalizable, Sampler<T>, Spliterator<T>, Typed<T>
- All Known Subinterfaces:
LocalizableSpliterator<T>
- All Known Implementing Classes:
ArrayLocalizingSpliterator, ArraySpliterator, CellSpliterator, CursorSpliterator, PlanarSpliterator, RealCursorSpliterator
A
Spliterator<T> which is Localizable similar to a Cursor.
The location of the Spliterator reflects the location of the element passed
to the Consumer in Spliterator.tryAdvance(Consumer) or Spliterator.forEachRemaining(Consumer)
(at the time the element is passed, and until the next element is passed).
Similar to RealCursor, RealLocalizableSpliterator usually
comes in two flavors:
IterableRealInterval.spliterator()computes location only on demand, andIterableRealInterval.localizingSpliterator()preemptively tracks location on every step.
To make the RealLocalizable property available in a Stream,
use the Streams utility class to create
Stream<RealLocalizableSampler<T>> (which internally wraps
RealLocalizableSpliterator).
Corresponding to the RealLocalizableSpliterator flavors,
Streams.localizable(IterableRealInterval)computes element location only on demand, andStreams.localizing(IterableRealInterval)tracks location on every step.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR> -
Field Summary
Fields inherited from interface Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Method Summary
Methods inherited from interface EuclideanSpace
numDimensionsMethods inherited from interface RealLocalizable
getDoublePosition, getFloatPosition, localize, localize, localize, positionAsDoubleArray, positionAsRealPointMethods inherited from interface Spliterator
characteristics, estimateSize, forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics, tryAdvance
-
Method Details
-
trySplit
RealLocalizableSpliterator<T> trySplit()- Specified by:
trySplitin interfaceSpliterator<T>
-
copy
RealLocalizableSpliterator<T> copy()- Specified by:
copyin interfaceSampler<T>- Returns:
- - A new
Samplerin the same state accessing the same values. It does NOT copy T, just the state of theSampler. Otherwise use T.copy() if available. Sampler.copy().get() == Sampler.get(), i.e. both hold the same value, not necessarily the same instance (this is the case for anArrayCursorfor example)
-