Interface PrimitiveIterator.OfLong

All Superinterfaces:
Iterator<Long>, PrimitiveIterator<Long, LongConsumer>
Enclosing interface:
PrimitiveIterator<T,T_CONS>

public static interface PrimitiveIterator.OfLong extends PrimitiveIterator<Long, LongConsumer>
An iterator of long values.
  • Method Details

    • nextLong

      long nextLong()
    • forEachRemaining

      default void forEachRemaining(LongConsumer action)
      Specified by:
      forEachRemaining in interface PrimitiveIterator<Long, LongConsumer>
    • next

      default Long next()
      Description copied from interface: Iterator

      Returns the next object in the iteration, i.e. returns the element in front of the iterator and advances the iterator by one position.

      Returns

      the next object.

      Throws
      • NoSuchElementException: if there are no more elements.
      See also
      • #hasNext
      Specified by:
      next in interface Iterator<Long>
    • forEachRemaining

      default void forEachRemaining(Consumer<? super Long> action)
      Description copied from interface: Iterator
      Hands each remaining element to action, in order.
      Specified by:
      forEachRemaining in interface Iterator<Long>