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:
java.util.Spliterator<P>
- Enclosing class:
- ContourPlot.Iterators
public static final class ContourPlot.Iterators.RowSpliterator<P extends ContourPlot.PixelBase> extends java.lang.Object implements java.util.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
java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,T_CONS extends java.lang.Object,T_SPLITR extends java.util.Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
-
-
Field Summary
Fields Modifier and Type Field Description private intendXinclusiveprivate intendYinclusiveprivate java.util.function.Supplier<P>pixelSupplierprivate Ppxprivate intstartXprivate intxprivate inty
-
Constructor Summary
Constructors Constructor Description RowSpliterator(int startX, int width, int startY, int endYincl, java.util.function.Supplier<P> pixelSupplier)Creates a new RowSpliterator for iterating the pixels in the specified area.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcharacteristics()longestimateSize()voidforEachRemaining(java.util.function.Consumer<? super P> action)booleantryAdvance(java.util.function.Consumer<? super P> action)java.util.Spliterator<P>trySplit()
-
-
-
Field Detail
-
startX
private final int startX
-
endXinclusive
private final int endXinclusive
-
x
private int x
-
y
private int y
-
endYinclusive
private int endYinclusive
-
pixelSupplier
private final java.util.function.Supplier<P extends ContourPlot.PixelBase> pixelSupplier
-
px
private final P extends ContourPlot.PixelBase px
-
-
Constructor Detail
-
RowSpliterator
public RowSpliterator(int startX, int width, int startY, int endYincl, java.util.function.Supplier<P> pixelSupplier)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 Detail
-
tryAdvance
public boolean tryAdvance(java.util.function.Consumer<? super P> action)
- Specified by:
tryAdvancein interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
forEachRemaining
public void forEachRemaining(java.util.function.Consumer<? super P> action)
- Specified by:
forEachRemainingin interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
trySplit
public java.util.Spliterator<P> trySplit()
- Specified by:
trySplitin interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
estimateSize
public long estimateSize()
- Specified by:
estimateSizein interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
characteristics
public int characteristics()
- Specified by:
characteristicsin interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
-