Module org.jhotdraw8.collection
Interface Enumerator.OfDouble
- All Superinterfaces:
BareEnumerator<Double>,Enumerator<Double>,Spliterator<Double>,Spliterator.OfDouble,Spliterator.OfPrimitive<Double,DoubleConsumer, Spliterator.OfDouble>
- All Known Implementing Classes:
AbstractDoubleEnumerator
- Enclosing interface:
Enumerator<E>
An object for enumerating primitive double-valued elements of a collection.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jhotdraw8.collection.enumerator.Enumerator
Enumerator.OfDouble, Enumerator.OfInt, Enumerator.OfLongNested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Method Summary
Modifier and TypeMethodDescriptiondefault Doublecurrent()Gets the element in the collection at the current position of the enumerator.doubleReturns the current value.default booleantryAdvance(Consumer<? super Double> action) default booleantryAdvance(DoubleConsumer action) Methods inherited from interface org.jhotdraw8.collection.enumerator.BareEnumerator
moveNextMethods inherited from interface java.util.Spliterator
characteristics, estimateSize, getComparator, getExactSizeIfKnown, hasCharacteristicsMethods inherited from interface java.util.Spliterator.OfDouble
forEachRemaining, forEachRemaining, trySplit
-
Method Details
-
current
Gets the element in the collection at the current position of the enumerator.Current is undefined under any of the following conditions:
- The enumerator is positioned before the first element in the collection.
Immediately after the enumerator is created
BareEnumerator.moveNext()must be called to advance the enumerator to the first element of the collection before reading the value of Current. - The last call to
BareEnumerator.moveNext()returned false, which indicates the end of the collection. - The enumerator is invalidated due to changes made in the collection, such as adding, modifying, or deleting elements.
- Specified by:
currentin interfaceBareEnumerator<Double>- Returns:
- current
- The enumerator is positioned before the first element in the collection.
Immediately after the enumerator is created
-
currentAsDouble
double currentAsDouble()Returns the current value.- Returns:
- current
- See Also:
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator.OfDouble- Specified by:
tryAdvancein interfaceSpliterator.OfPrimitive<Double,DoubleConsumer, Spliterator.OfDouble>
-
tryAdvance
- Specified by:
tryAdvancein interfaceEnumerator<Double>- Specified by:
tryAdvancein interfaceSpliterator<Double>- Specified by:
tryAdvancein interfaceSpliterator.OfDouble
-