Class IntHashSet.IntIterator

java.lang.Object
org.agrona.collections.IntHashSet.IntIterator
All Implemented Interfaces:
Iterator<Integer>
Enclosing class:
IntHashSet

public final class IntHashSet.IntIterator extends Object implements Iterator<Integer>
Iterator which supports unboxed access to the values via nextValue().
  • Field Details

    • remaining

      private int remaining
    • positionCounter

      private int positionCounter
    • stopCounter

      private int stopCounter
    • isPositionValid

      private boolean isPositionValid
  • Constructor Details

    • IntIterator

      public IntIterator()
  • Method Details

    • reset

    • hasNext

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

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

      public Integer next()
      Specified by:
      next in interface Iterator<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 Iterator<Integer>
    • findNext

      private void findNext()
    • position

      private int position(int[] values)