@Generated(value="Autogenerated by OpenJAX CodeGen Template (0.2.5)", date="2020-05-23") public interface IntIterator
Iterator
interface that defines synonymous
methods for the iteration over int
values instead of Object
references.Modifier and Type | Method and Description |
---|---|
default void |
forEachRemaining(IntConsumer action)
Performs the given action for each remaining value until all values have
been processed or the action throws an exception.
|
boolean |
hasNext()
Returns
true if the iteration has more values. |
int |
next()
Returns the next value in the iteration.
|
default void |
remove()
Removes from the underlying collection the last value returned by this
iterator (optional operation).
|
boolean hasNext()
true
if the iteration has more values. (In other words,
returns true
if next()
would return a value rather than
throwing an exception.)true
if the iteration has more values.int next()
NoSuchElementException
- If the iteration has no more values.default void remove()
next()
.
The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called after a
call to the forEachRemaining(IntConsumer)
method.
The default implementation throws an instance of
UnsupportedOperationException
and performs no other action.
UnsupportedOperationException
- If the remove
operation is
not supported by this iterator.IllegalStateException
- If the next
method has not yet been
called, or the remove
method has already been called
after the last call to the next
method.default void forEachRemaining(IntConsumer action)
The behavior of an iterator is unspecified if the action modifies the
collection in any way (even by calling the remove()
method or
other mutator methods of Iterator
subtypes), unless an
overriding class has specified a concurrent modification policy.
Subsequent behavior of an iterator is unspecified if the action throws an exception.
The default implementation behaves as if:
while (hasNext())
action.accept(next());
action
- The action to be performed for each value.NullPointerException
- If the specified action is null.Copyright © 2020 LibJ. All rights reserved.