Class Long2ObjectHashMap.EntryIterator

java.lang.Object
org.agrona.collections.Long2ObjectHashMap.EntryIterator
All Implemented Interfaces:
Iterator<Map.Entry<Long,V>>, Map.Entry<Long,V>
Enclosing class:
Long2ObjectHashMap<V>

public final class Long2ObjectHashMap.EntryIterator extends Object implements Map.Entry<Long,V>
Iterator over entries which supports access to unboxed keys via getLongKey().
  • Constructor Details

    • EntryIterator

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

    • next

      public Map.Entry<Long,V> next()
      Specified by:
      next in interface Iterator<Map.Entry<Long,V>>
    • getKey

      public Long getKey()
      Specified by:
      getKey in interface Map.Entry<Long,V>
    • getLongKey

      public long getLongKey()
      Get key without boxing.
      Returns:
      key.
    • getValue

      public V getValue()
      Specified by:
      getValue in interface Map.Entry<Long,V>
    • setValue

      public V setValue(V value)
      Specified by:
      setValue in interface Map.Entry<Long,V>
    • 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>