T - pixel typepublic interface LocalizableSpliterator<T> extends RealLocalizableSpliterator<T>, Localizable
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(java.util.function.Consumer<? super T>) or Spliterator.forEachRemaining(java.util.function.Consumer<? super T>)
(at the time the element is passed, and until the next element is passed).
Similar to Cursor, LocalizableSpliterator usually
comes in two flavors:
IterableInterval.spliterator() computes location only on demand, andIterableInterval.localizingSpliterator() preemptively tracks location on every step.
To make the Localizable property available in a Stream, use
the Streams utility class to create Stream<LocalizableSampler<T>> (which internally wraps LocalizableSpliterator).
Corresponding to the LocalizableSpliterator flavors,
Streams.localizable(IterableInterval) computes element location only on demand, and
Streams.localizing(IterableInterval) tracks location on every step.Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED| Modifier and Type | Method and Description |
|---|---|
LocalizableSpliterator<T> |
copy() |
LocalizableSpliterator<T> |
trySplit() |
characteristics, estimateSize, forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics, tryAdvancegetDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize, positionAsLongArray, positionAsPointlocalize, localize, positionAsDoubleArray, positionAsRealPointnumDimensionsLocalizableSpliterator<T> trySplit()
trySplit in interface RealLocalizableSpliterator<T>trySplit in interface Spliterator<T>LocalizableSpliterator<T> copy()
copy in interface RealLocalizableSpliterator<T>copy in interface Sampler<T>Sampler in the same state accessing the same
values.
It does NOT copy T, just the state of the Sampler.
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 an
ArrayCursor for example)Copyright © 2009–2025 ImgLib2. All rights reserved.