Class IntIntMap.KeyIterator

java.lang.Object
com.github.tommyettinger.ds.IntIntMap.MapIterator
com.github.tommyettinger.ds.IntIntMap.KeyIterator
All Implemented Interfaces:
IntIterator, Iterator<Integer>
Enclosing class:
IntIntMap

public static class IntIntMap.KeyIterator extends IntIntMap.MapIterator implements IntIterator
  • Constructor Details

    • KeyIterator

      public KeyIterator(IntIntMap map)
  • Method Details

    • nextInt

      public int nextInt()
      Description copied from interface: IntIterator
      Returns the next int element in the iteration.
      Specified by:
      nextInt in interface IntIterator
      Returns:
      the next int element in the iteration
    • toList

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

      public boolean hasNext()
      Description copied from class: IntIntMap.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<Integer>
      Overrides:
      hasNext in class IntIntMap.MapIterator
      Returns:
      true if the iteration has more elements