public interface DoubleIterator extends PrimitiveIterator.OfDouble
Iterator; provides an additional method to avoid (un)boxing, and
the possibility to skip elements.IteratorPrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| Modifier and Type | Method and Description |
|---|---|
default void |
forEachRemaining(Consumer<? super Double> action)
Deprecated.
Please use the corresponding type-specific method instead.
|
default Double |
next()
Deprecated.
Please use the corresponding type-specific method instead.
|
double |
nextDouble()
Returns the next element as a primitive type.
|
default int |
skip(int n)
Skips the given number of elements.
|
forEachRemainingdouble nextDouble()
nextDouble in interface PrimitiveIterator.OfDoubleIterator.next()@Deprecated default Double next()
next in interface Iterator<Double>next in interface PrimitiveIterator.OfDouble@Deprecated default void forEachRemaining(Consumer<? super Double> action)
forEachRemaining in interface Iterator<Double>forEachRemaining in interface PrimitiveIterator.OfDoubledefault int skip(int n)
The effect of this call is exactly the same as that of calling next() for n times (possibly stopping if Iterator.hasNext() becomes false).
n - the number of elements to skip.Iterator.next()