Class Int2ObjectCache.KeyIterator

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

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

    • KeyIterator

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

    • next

      public Integer next()
      Specified by:
      next in interface Iterator<Integer>
    • nextInt

      public int nextInt()
      Return next key without boxing.
      Returns:
      next key.
    • 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>