public interface DForEachIterator extends DIterator
DIterator adding the two (default) methods
remove() and forEachRemaining(DoubleConsumer).| Modifier and Type | Method and Description |
|---|---|
default void |
forEachRemaining(DoubleConsumer action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
default void |
remove()
Removes from the underlying collection the last element returned by this
iterator.
|
default void remove()
DIterator.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. The default implementation throws an instance of
UnsupportedOperationException and performs no other action.UnsupportedOperationException - if the remove operation is not supported by this
iteratorIllegalStateException - if the next method has not yet been called, or the
remove method has already been called after the last
call to the next methoddefault void forEachRemaining(DoubleConsumer action)
The default implementation behaves as if:
while (hasNext())
action.accept(next());
action - The action to be performed for each elementNullPointerException - if the specified action is nullCopyright © 2022. All rights reserved.