Class ObjectHashSet.ObjectIterator

java.lang.Object
org.agrona.collections.ObjectHashSet.ObjectIterator
All Implemented Interfaces:
Iterator<T>
Enclosing class:
ObjectHashSet<T>

public final class ObjectHashSet.ObjectIterator extends Object implements Iterator<T>
Iterator over the set which can be optionally cached to avoid allocation.
  • Field Details

    • remaining

      private int remaining
    • positionCounter

      private int positionCounter
    • stopCounter

      private int stopCounter
    • isPositionValid

      private boolean isPositionValid
  • Constructor Details

    • ObjectIterator

      public ObjectIterator()
      Creates a new instance.
  • Method Details

    • reset

    • remaining

      public int remaining()
      Return number of remaining elements.
      Returns:
      number of remaining elements.
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

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

      public T nextValue()
      Get the next value.
      Returns:
      the next value.
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>
    • position

      private int position(T[] values)