public static interface PrimitiveIterator.OfInt extends PrimitiveIterator<Integer,IntConsumer>
int
values.PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
Modifier and Type | Method and Description |
---|---|
void |
forEachRemaining(IntConsumer action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
Integer |
next()
Implementation Requirements:
The default implementation boxes the result of calling nextInt() , and returns that boxed result. |
int |
nextInt()
Returns the next
int element in the iteration. |
forEachRemaining, hasNext, remove
int nextInt()
int
element in the iteration.int
element in the iterationNoSuchElementException
- if the iteration has no more elementsvoid forEachRemaining(IntConsumer action)
Implementation Requirements:
The default implementation behaves as if:
while (hasNext())
action.accept(nextInt());
forEachRemaining
in interface PrimitiveIterator<Integer,IntConsumer>
action
- The action to be performed for each elementNullPointerException
- if the specified action is nullCopyright © 2016. All rights reserved.