Class LongHashSet.LongIterator

java.lang.Object
org.agrona.collections.LongHashSet.LongIterator
All Implemented Interfaces:
Iterator<Long>
Enclosing class:
LongHashSet

public final class LongHashSet.LongIterator extends Object implements Iterator<Long>
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

    • LongIterator

      public LongIterator()
      Create a new instance.
  • Method Details

    • reset

    • hasNext

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

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

      public Long next()
      Specified by:
      next in interface Iterator<Long>
    • nextValue

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

      public void remove()
      Specified by:
      remove in interface Iterator<Long>
    • findNext

      private void findNext()
    • position

      private int position(long[] values)