Package gov.nih.mipav.model.algorithms
Class ContourPlot.Iterators.ImgSpliterator<P extends ContourPlot.PixelBase>
java.lang.Object
gov.nih.mipav.model.algorithms.ContourPlot.Iterators.ImgSpliterator<P>
- All Implemented Interfaces:
Spliterator<P>
- Enclosing class:
ContourPlot.Iterators
public static final class ContourPlot.Iterators.ImgSpliterator<P extends ContourPlot.PixelBase>
extends Object
implements Spliterator<P>
The standard
Spliterator class for images.- Author:
- hageldave
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
FieldsFields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsConstructorDescriptionImgSpliterator(int startIndex, int endIndex, int minSplitSize, Supplier<P> pixelSupplier) Constructs a new ImgSpliterator for the specified index range -
Method Summary
Modifier and TypeMethodDescriptionintlongvoidforEachRemaining(Consumer<? super P> action) private voidsetEndIndex(int endIndex) booleantryAdvance(Consumer<? super P> action) trySplit()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
pixelSupplier
-
px
-
endIndex
private int endIndex -
minimumSplitSize
private final int minimumSplitSize
-
-
Constructor Details
-
ImgSpliterator
Constructs a new ImgSpliterator for the specified index range- Parameters:
startIndex- first index of the range (inclusive)endIndex- last index of the range (inclusive)minSplitSize- minimum split size for this spliterator (minimum number of elements in a split)pixelSupplier- a function that allocates a new pixel that points to the index given by the function argument- Since:
- 1.0
-
-
Method Details
-
setEndIndex
private void setEndIndex(int endIndex) -
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<P extends ContourPlot.PixelBase>
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceSpliterator<P extends ContourPlot.PixelBase>
-
trySplit
- Specified by:
trySplitin interfaceSpliterator<P extends ContourPlot.PixelBase>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<P extends ContourPlot.PixelBase>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<P extends ContourPlot.PixelBase>
-