Class Int2ObjectCache.EntryIterator

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

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

    • EntryIterator

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

    • next

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

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

      public int getIntKey()
      Get key of the current entry.
      Returns:
      key of the current entry.
    • getValue

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

      public V setValue(V value)
      Specified by:
      setValue in interface Map.Entry<Integer,V>
    • position

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

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

      protected final void findNext()
      Find next element.
    • remove

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