Package it.unimi.dsi.fastutil.doubles
Class AbstractDoubleIterator
java.lang.Object
it.unimi.dsi.fastutil.doubles.AbstractDoubleIterator
- All Implemented Interfaces:
DoubleIterator,java.util.Iterator<java.lang.Double>,java.util.PrimitiveIterator<java.lang.Double,java.util.function.DoubleConsumer>,java.util.PrimitiveIterator.OfDouble
- Direct Known Subclasses:
AbstractDoubleBidirectionalIterator,DoubleBigListIterators.AbstractIndexBasedBigIterator,DoubleIterators.AbstractIndexBasedIterator
public abstract class AbstractDoubleIterator extends java.lang.Object implements DoubleIterator
An abstract class facilitating the creation of type-specific iterators.
- API Notes:
- Up to version 8.5.0, this class was deprecated as abstract methods
were turned into default methods of the type-specific interface. Now
the class hosts finalized versions of default delegating methods
such as
forEachRemaining(it.unimi.dsi.fastutil.doubles.DoubleConsumer).
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
java.util.PrimitiveIterator.OfDouble, java.util.PrimitiveIterator.OfInt, java.util.PrimitiveIterator.OfLong -
Method Summary
Modifier and Type Method Description voidforEachRemaining(DoubleConsumer action)Performs the given action for each remaining element until all elements have been processed or the action throws an exception.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleIterator
forEachRemaining, next, nextDouble, skipMethods inherited from interface java.util.Iterator
hasNext, removeMethods inherited from interface java.util.PrimitiveIterator.OfDouble
forEachRemaining
-
Method Details
-
forEachRemaining
Performs the given action for each remaining element until all elements have been processed or the action throws an exception.WARNING: Overriding this method is almost always a mistake, as this overload only exists to disambiguate. Instead, override the
forEachRemaining()overload that uses the JDK's primitive consumer type (e.g.IntConsumer).If Java supported final default methods, this would be one, but sadly it does not.
If you checked and are overriding the version with
java.util.function.XConsumer, and still see this warning, then your IDE is incorrectly conflating this method with the proper method to override, and you can safely ignore this message.- Specified by:
forEachRemainingin interfaceDoubleIterator- Parameters:
action- the action to be performed for each element.- See Also:
Iterator.forEachRemaining(java.util.function.Consumer)- Implementation Specification:
- This method just delegates to the interface default method, as the default method, but it is final, so it cannot be overridden.
-