Class ContourPlot.Iterators.ColSpliterator<P extends ContourPlot.PixelBase>

  • All Implemented Interfaces:
    java.util.Spliterator<P>
    Enclosing class:
    ContourPlot.Iterators

    public static final class ContourPlot.Iterators.ColSpliterator<P extends ContourPlot.PixelBase>
    extends java.lang.Object
    implements java.util.Spliterator<P>
    Special Spliterator which guarantees that each split will cover at least an entire column 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 int endXinclusive  
      private int endYinclusive  
      private java.util.function.Supplier<P> pixelSupplier  
      private P px  
      private int startY  
      private int x  
      private int y  
      • Fields inherited from interface java.util.Spliterator

        CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
    • Constructor Summary

      Constructors 
      Constructor Description
      ColSpliterator​(int startX, int endXincl, int startY, int height, 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
      int characteristics()  
      long estimateSize()  
      void forEachRemaining​(java.util.function.Consumer<? super P> action)  
      boolean tryAdvance​(java.util.function.Consumer<? super P> action)  
      java.util.Spliterator<P> trySplit()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Spliterator

        getComparator, getExactSizeIfKnown, hasCharacteristics
    • Field Detail

      • startY

        private final int startY
      • endXinclusive

        private int endXinclusive
      • x

        private int x
      • y

        private int y
      • endYinclusive

        private final int endYinclusive
    • Constructor Detail

      • ColSpliterator

        public ColSpliterator​(int startX,
                              int endXincl,
                              int startY,
                              int height,
                              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)
        endXincl - right boundary of the area (inclusive)
        startY - top boundary of the area (inclusive)
        height - of the area
        pixelSupplier - a function that allocates a new pixel
    • Method Detail

      • tryAdvance

        public boolean tryAdvance​(java.util.function.Consumer<? super P> action)
        Specified by:
        tryAdvance in interface java.util.Spliterator<P extends ContourPlot.PixelBase>
      • forEachRemaining

        public void forEachRemaining​(java.util.function.Consumer<? super P> action)
        Specified by:
        forEachRemaining in interface java.util.Spliterator<P extends ContourPlot.PixelBase>
      • trySplit

        public java.util.Spliterator<P> trySplit()
        Specified by:
        trySplit in interface java.util.Spliterator<P extends ContourPlot.PixelBase>
      • estimateSize

        public long estimateSize()
        Specified by:
        estimateSize in interface java.util.Spliterator<P extends ContourPlot.PixelBase>
      • characteristics

        public int characteristics()
        Specified by:
        characteristics in interface java.util.Spliterator<P extends ContourPlot.PixelBase>