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

  • Type Parameters:
    P - the pixel type of this iterator
    All Implemented Interfaces:
    java.util.Iterator<P>
    Enclosing class:
    ContourPlot.Iterators

    public static class ContourPlot.Iterators.ImgIterator<P extends ContourPlot.PixelBase>
    extends java.lang.Object
    implements java.util.Iterator<P>
    The standard Iterator class for images.
    Author:
    hageldave
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int index  
      private int numValues  
      private P px  
    • Constructor Summary

      Constructors 
      Constructor Description
      ImgIterator​(P px)
      Creates a new ImgIterator over the image of the specified pixel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void forEachRemaining​(java.util.function.Consumer<? super P> action)  
      boolean hasNext()  
      P next()  
      • Methods inherited from class java.lang.Object

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

        remove
    • Field Detail

      • numValues

        private final int numValues
      • index

        private int index
    • Constructor Detail

      • ImgIterator

        public ImgIterator​(P px)
        Creates a new ImgIterator over the image of the specified pixel. The specified pixel will be reused on every invocation of next() with incremented index.
        Parameters:
        px - pixel that will be used to iterate its image
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<P extends ContourPlot.PixelBase>
      • forEachRemaining

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