Interface PrimitiveIterator.OfInt
- All Superinterfaces:
Iterator<Integer>, PrimitiveIterator<Integer, IntConsumer>
- Enclosing interface:
PrimitiveIterator<T,T_CONS>
An iterator of
int values.-
Nested Class Summary
Nested classes/interfaces inherited from interface PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Method Summary
Modifier and TypeMethodDescriptiondefault voidforEachRemaining(Consumer<? super Integer> action) Hands each remaining element toaction, in order.default voidforEachRemaining(IntConsumer action) default Integernext()Returns the next object in the iteration, i.e.intnextInt()
-
Method Details
-
nextInt
int nextInt() -
forEachRemaining
- Specified by:
forEachRemainingin interfacePrimitiveIterator<Integer, IntConsumer>
-
next
Description copied from interface:IteratorReturns 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
-
forEachRemaining
-