Interface CloseablePrimitiveIteratorOfDouble
- All Superinterfaces:
AutoCloseable,CloseableIterator<Double>,CloseablePrimitiveIterator<Double,,DoubleConsumer> Iterator<Double>,PrimitiveIterator<Double,,DoubleConsumer> PrimitiveIterator.OfDouble
- All Known Subinterfaces:
DoubleColumnIterator,ValueIteratorOfDouble
- All Known Implementing Classes:
ChunkedDoubleColumnIterator,SerialDoubleColumnIterator
public interface CloseablePrimitiveIteratorOfDouble
extends PrimitiveIterator.OfDouble, CloseablePrimitiveIterator<Double,DoubleConsumer>
Closeable primitive iterator over elements of type double.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfDoubleA re-usable, immutable CloseablePrimitiveIteratorOfDouble with no elements. -
Method Summary
Modifier and TypeMethodDescriptionconcat(@NotNull CloseablePrimitiveIteratorOfDouble... subIterators) Create a CloseablePrimitiveIteratorOfDouble that concatenates an array of non-nullsubIterators.default DoubleStreamCreate aDoubleStreamover the remaining elements of this CloseablePrimitiveIteratorOfDouble.empty()Get a CloseablePrimitiveIteratorOfDouble with no elements.maybeConcat(@Nullable CloseablePrimitiveIteratorOfDouble first, @Nullable CloseablePrimitiveIteratorOfDouble second, @Nullable CloseablePrimitiveIteratorOfDouble third) Return a CloseablePrimitiveIteratorOfDouble that concatenates the contents of any non-nullCloseablePrimitiveIteratorOfDouble found amongstfirst,second, andthird.of(@org.jetbrains.annotations.NotNull double... values) Create a CloseablePrimitiveIteratorOfDouble over an array ofdouble.repeat(double value, long repeatCount) Create a CloseablePrimitiveIteratorOfDouble that repeatsvalue,repeatCounttimes.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close, streamMethods inherited from interface java.util.PrimitiveIterator.OfDouble
forEachRemaining, forEachRemaining, next, nextDouble
-
Field Details
-
EMPTY
A re-usable, immutable CloseablePrimitiveIteratorOfDouble with no elements.
-
-
Method Details
-
doubleStream
Create aDoubleStreamover the remaining elements of this CloseablePrimitiveIteratorOfDouble. Closing the result will close this CloseablePrimitiveIteratorOfDouble.- Returns:
- A
DoubleStreamover the remaining contents of this iterator
-
empty
Get a CloseablePrimitiveIteratorOfDouble with no elements. The result does not need to beclosed.- Returns:
- A CloseablePrimitiveIteratorOfDouble with no elements
-
of
static CloseablePrimitiveIteratorOfDouble of(@NotNull @org.jetbrains.annotations.NotNull double... values) Create a CloseablePrimitiveIteratorOfDouble over an array ofdouble. The result does not need to beclosed.- Parameters:
values- The elements to iterate- Returns:
- A CloseablePrimitiveIteratorOfDouble of
values
-
repeat
Create a CloseablePrimitiveIteratorOfDouble that repeatsvalue,repeatCounttimes. The result does not need to beclosed.- Parameters:
value- The value to repeatrepeatCount- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfDouble that repeats
value,repeatCounttimes
-
concat
static CloseablePrimitiveIteratorOfDouble concat(@NotNull @NotNull CloseablePrimitiveIteratorOfDouble... subIterators) Create a CloseablePrimitiveIteratorOfDouble that concatenates an array of non-nullsubIterators. The result only needs to beclosedif any of thesubIteratorsrequire it.- Parameters:
subIterators- The iterators to concatenate, none of which should benull. If directly passing an array, ensure that this iterator has full ownership.- Returns:
- A CloseablePrimitiveIteratorOfDouble concatenating all elements from
subIterators
-
maybeConcat
static CloseablePrimitiveIteratorOfDouble maybeConcat(@Nullable @Nullable CloseablePrimitiveIteratorOfDouble first, @Nullable @Nullable CloseablePrimitiveIteratorOfDouble second, @Nullable @Nullable CloseablePrimitiveIteratorOfDouble third) Return a CloseablePrimitiveIteratorOfDouble that concatenates the contents of any non-nullCloseablePrimitiveIteratorOfDouble found amongstfirst,second, andthird.- Parameters:
first- The first iterator to consider concatenatingsecond- The second iterator to consider concatenatingthird- The third iterator to consider concatenating- Returns:
- A CloseablePrimitiveIteratorOfDouble that concatenates all elements as specified
-