Class Long2ObjectHashMap.KeyIterator

java.lang.Object
org.agrona.collections.Long2ObjectHashMap.KeyIterator
All Implemented Interfaces:
Iterator<Long>
Enclosing class:
Long2ObjectHashMap<V>

public final class Long2ObjectHashMap.KeyIterator extends Object
Iterator over keys which supports access to unboxed keys via nextLong().
  • Constructor Details

    • KeyIterator

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

    • next

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

      public long nextLong()
      Return next key without boxing.
      Returns:
      next key.
    • position

      protected final int position()
      Position of the current element.
      Returns:
      position of the current element.
    • remaining

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

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

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

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