Class LongObjectMap.KeyIterator<V>

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

public static class LongObjectMap.KeyIterator<V> extends LongObjectMap.MapIterator<V> implements LongIterator
  • Constructor Details

  • 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: LongObjectMap.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<V>
      Overrides:
      hasNext in class LongObjectMap.MapIterator<V>
      Returns:
      true if the iteration has more elements