Class LongLongMap.ValueIterator

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

public static class LongLongMap.ValueIterator extends LongLongMap.MapIterator implements LongIterator
  • Constructor Details

    • ValueIterator

      public ValueIterator(LongLongMap map)
  • Method Details

    • nextLong

      public long nextLong()
      Returns the next long element in the iteration.
      Specified by:
      nextLong in interface LongIterator
      Returns:
      the next long element in the iteration
      Throws:
      NoSuchElementException - if the iteration has no more elements
    • hasNext

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