Class IntHashSet.IntIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Integer>
    Enclosing class:
    IntHashSet

    public final class IntHashSet.IntIterator
    extends java.lang.Object
    implements java.util.Iterator<java.lang.Integer>
    Iterator which supports unboxed access to the values via nextValue().
    • Constructor Summary

      Constructors 
      Constructor Description
      IntIterator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void findNext()  
      boolean hasNext()
      java.lang.Integer next()
      int nextValue()
      Strongly typed alternative of Iterator.next() to avoid boxing.
      private int position​(int[] values)  
      int remaining()
      Returns number of remaining (not yet visited) elements.
      void remove()
      (package private) IntHashSet.IntIterator reset()  
      • 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

        forEachRemaining
    • Field Detail

      • remaining

        private int remaining
      • positionCounter

        private int positionCounter
      • stopCounter

        private int stopCounter
      • isPositionValid

        private boolean isPositionValid
    • Constructor Detail

      • IntIterator

        public IntIterator()
    • Method Detail

      • hasNext

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

        public int remaining()
        Returns number of remaining (not yet visited) elements.
        Returns:
        number of remaining elements.
      • next

        public java.lang.Integer next()
        Specified by:
        next in interface java.util.Iterator<java.lang.Integer>
      • nextValue

        public int nextValue()
        Strongly typed alternative of Iterator.next() to avoid boxing.
        Returns:
        the next int value.
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.lang.Integer>
      • findNext

        private void findNext()
      • position

        private int position​(int[] values)