Class LongIntMap.KeyIterator

java.lang.Object
com.github.tommyettinger.ds.LongIntMap.MapIterator
com.github.tommyettinger.ds.LongIntMap.KeyIterator
All Implemented Interfaces:
LongIterator, Iterator<Long>
Enclosing class:
LongIntMap

public static class LongIntMap.KeyIterator extends LongIntMap.MapIterator implements LongIterator
  • Constructor Details

    • KeyIterator

      public KeyIterator(LongIntMap map)
  • Method Details

    • nextLong

      public long nextLong()
      Description copied from interface: LongIterator
      Returns the next long element in the iteration.
      Specified by:
      nextLong in interface LongIterator
      Returns:
      the next long element in the iteration
    • toList

      public LongList toList()
      Returns a new LongList containing the remaining keys.
    • hasNext

      public boolean hasNext()
      Description copied from class: LongIntMap.MapIterator
      Returns true if the iteration has more elements. (In other words, returns true if next() would return an element rather than throwing an exception.)
      Specified by:
      hasNext in interface Iterator<Long>
      Overrides:
      hasNext in class LongIntMap.MapIterator
      Returns:
      true if the iteration has more elements