Package jflex.chars

Class Interval.IntervalIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Integer>, java.util.PrimitiveIterator<java.lang.Integer,​java.util.function.IntConsumer>, java.util.PrimitiveIterator.OfInt
    Enclosing class:
    Interval

    public class Interval.IntervalIterator
    extends java.lang.Object
    implements java.util.PrimitiveIterator.OfInt
    Iterator for enumerating the elements of this Interval
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.PrimitiveIterator

        java.util.PrimitiveIterator.OfDouble, java.util.PrimitiveIterator.OfInt, java.util.PrimitiveIterator.OfLong
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int pos
      The current iterator position
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private IntervalIterator()
      New iterator that starts at the beginning of the
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      int nextInt()  
      • 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
      • Methods inherited from interface java.util.PrimitiveIterator.OfInt

        forEachRemaining, forEachRemaining, next
    • Field Detail

      • pos

        private int pos
        The current iterator position
    • Constructor Detail

      • IntervalIterator

        private IntervalIterator()
        New iterator that starts at the beginning of the
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.Integer>
      • nextInt

        public int nextInt()
        Specified by:
        nextInt in interface java.util.PrimitiveIterator.OfInt