Interface PrimitiveIterator.OfInt

All Superinterfaces:
Iterator<Integer>, PrimitiveIterator<Integer, IntConsumer>
Enclosing interface:
PrimitiveIterator<T,T_CONS>

public static interface PrimitiveIterator.OfInt extends PrimitiveIterator<Integer, IntConsumer>
An iterator of int values.
  • Method Details

    • nextInt

      int nextInt()
    • forEachRemaining

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

      default Integer 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<Integer>
    • forEachRemaining

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