Package it.unimi.dsi.fastutil.doubles
Interface DoubleIterator
- All Superinterfaces:
Iterator<Double>,PrimitiveIterator<Double,DoubleConsumer>,PrimitiveIterator.OfDouble
- All Known Subinterfaces:
DoubleBidirectionalIterator,DoubleBigListIterator,DoubleListIterator
- All Known Implementing Classes:
AbstractDoubleBidirectionalIterator,AbstractDoubleBigListIterator,AbstractDoubleIterator,AbstractDoubleListIterator,DoubleBigListIterators.BigListIteratorListIterator,DoubleBigListIterators.EmptyBigListIterator,DoubleBigListIterators.UnmodifiableBigListIterator,DoubleIterators.EmptyIterator,DoubleIterators.UnmodifiableBidirectionalIterator,DoubleIterators.UnmodifiableIterator,DoubleIterators.UnmodifiableListIterator
public interface DoubleIterator extends PrimitiveIterator.OfDouble
A type-specific
Iterator; provides an additional method to avoid
(un)boxing, and the possibility to skip elements.- See Also:
Iterator
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Method Summary
Modifier and Type Method Description default voidforEachRemaining(Consumer<? super Double> action)Deprecated.Please use the corresponding type-specific method instead.default Doublenext()Deprecated.Please use the corresponding type-specific method instead.doublenextDouble()Returns the next element as a primitive type.default intskip(int n)Skips the given number of elements.
-
Method Details
-
nextDouble
double nextDouble()Returns the next element as a primitive type.- Specified by:
nextDoublein interfacePrimitiveIterator.OfDouble- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
-
next
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
nextin interfaceIterator<Double>- Specified by:
nextin interfacePrimitiveIterator.OfDouble
-
forEachRemaining
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
forEachRemainingin interfaceIterator<Double>- Specified by:
forEachRemainingin interfacePrimitiveIterator.OfDouble
-
skip
default int skip(int n)Skips the given number of elements.The effect of this call is exactly the same as that of calling
next()forntimes (possibly stopping ifIterator.hasNext()becomes false).- Parameters:
n- the number of elements to skip.- Returns:
- the number of elements actually skipped.
- See Also:
Iterator.next()
-