Class Object2ObjectHashMap.AbstractIterator

java.lang.Object
org.agrona.collections.Object2ObjectHashMap.AbstractIterator
Direct Known Subclasses:
Object2ObjectHashMap.EntryIterator, Object2ObjectHashMap.KeyIterator, Object2ObjectHashMap.ValueIterator
Enclosing class:
Object2ObjectHashMap<K,V>

abstract class Object2ObjectHashMap.AbstractIterator extends Object
Base iterator impl.
  • Field Details

    • isPositionValid

      protected boolean isPositionValid
      Is position valid.
    • remaining

      private int remaining
    • positionCounter

      private int positionCounter
    • stopCounter

      private int stopCounter
  • Constructor Details

    • AbstractIterator

      AbstractIterator()
  • Method Details

    • reset

      final void reset()
    • keyPosition

      final int keyPosition()
    • remaining

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

      public boolean hasNext()
      Check if there is next element to iterate.
      Returns:
      true if remaining > 0.
    • findNext

      protected final void findNext()
      Find next element.
      Throws:
      NoSuchElementException - if no more elements.
    • remove

      public void remove()
      Removes from the underlying collection the last element returned by this iterator.