public interface DoubleIterator
extends java.util.Iterator<java.lang.Double>
Iterator that reduces (un)boxing| Modifier and Type | Method and Description |
|---|---|
default void |
forEachRemaining(java.util.function.Consumer<? super java.lang.Double> action)
Deprecated.
Please use the corresponding type-specific function instead.
|
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 java.lang.Double |
next()
Deprecated.
Please use the corresponding type-specific function instead.
|
double |
nextDouble()
Returns the next element in the iteration.
|
default int |
skip(int amount)
Skips the Given amount of elements if possible.
|
double nextDouble()
java.util.NoSuchElementException - if the iteration has no more elementsIterator.next()@Deprecated default java.lang.Double next()
This default implementation delegates to the corresponding type-specific function.
next in interface java.util.Iterator<java.lang.Double>default void forEachRemaining(DoubleConsumer action)
action - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nullIterator.forEachRemaining(Consumer)The default implementation behaves as if:
while (hasNext()) action.accept(nextDouble());
@Deprecated default void forEachRemaining(java.util.function.Consumer<? super java.lang.Double> action)
This default implementation delegates to the corresponding type-specific function.
forEachRemaining in interface java.util.Iterator<java.lang.Double>default int skip(int amount)
amount - the amount of elements that should be skipped