Package gov.nih.mipav.model.algorithms
Class ContourPlot.Iterators.RowSpliterator<P extends ContourPlot.PixelBase>
java.lang.Object
gov.nih.mipav.model.algorithms.ContourPlot.Iterators.RowSpliterator<P>
- All Implemented Interfaces:
Spliterator<P>
- Enclosing class:
ContourPlot.Iterators
public static final class ContourPlot.Iterators.RowSpliterator<P extends ContourPlot.PixelBase>
extends Object
implements Spliterator<P>
Special Spliterator for images which guarantees that each split will cover at least
an entire row of the image.
- 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
FieldsModifier and TypeFieldDescriptionprivate final intprivate intprivate final Pprivate final intprivate intprivate intFields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsConstructorDescriptionRowSpliterator(int startX, int width, int startY, int endYincl, Supplier<P> pixelSupplier) Creates a new RowSpliterator for iterating the pixels in the specified area. -
Method Summary
Modifier and TypeMethodDescriptionintlongvoidforEachRemaining(Consumer<? super P> action) 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
-
startX
private final int startX -
endXinclusive
private final int endXinclusive -
x
private int x -
y
private int y -
endYinclusive
private int endYinclusive -
pixelSupplier
-
px
-
-
Constructor Details
-
RowSpliterator
Creates a new RowSpliterator for iterating the pixels in the specified area. Each split is guaranteed to cover at least 1 entire row of the area.- Parameters:
startX- left boundary of the area (inclusive)width- width of the areastartY- top boundary of the area (inclusive)endYincl- bottom boundary of the area (inclusive)pixelSupplier- a function that allocates a new pixel
-
-
Method Details
-
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>
-