Class Object2ObjectHashMap.KeyIterator

java.lang.Object
org.agrona.collections.Object2ObjectHashMap.KeyIterator
All Implemented Interfaces:
Iterator<K>
Enclosing class:
Object2ObjectHashMap<K,V>

public final class Object2ObjectHashMap.KeyIterator extends Object implements Iterator<K>
An iterator over keys.
  • Field Details

    • isPositionValid

      protected boolean isPositionValid
      Is position valid.
  • Constructor Details

    • KeyIterator

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

    • next

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