Interface CloseablePrimitiveIteratorOfDouble
- All Superinterfaces:
AutoCloseable
,CloseableIterator<Double>
,CloseablePrimitiveIterator<Double,
,DoubleConsumer> Iterator<Double>
,PrimitiveIterator<Double,
,DoubleConsumer> PrimitiveIterator.OfDouble
- All Known Subinterfaces:
DoubleColumnIterator
- 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
Modifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfDouble
A re-usable, immutable CloseablePrimitiveIteratorOfDouble with no elements. -
Method Summary
Modifier and TypeMethodDescriptionconcat
(@NotNull CloseablePrimitiveIteratorOfDouble... subIterators) Create a CloseablePrimitiveIteratorOfDouble that concatenates an array of non-null
subIterators
.default DoubleStream
Create aDoubleStream
over 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-null
CloseablePrimitiveIteratorOfDouble 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
,repeatCount
times.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close, stream
Methods 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 aDoubleStream
over the remaining elements of this CloseablePrimitiveIteratorOfDouble. Closing the result will close this CloseablePrimitiveIteratorOfDouble.- Returns:
- A
DoubleStream
over 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
,repeatCount
times. The result does not need to beclosed
.- Parameters:
value
- The value to repeatrepeatCount
- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfDouble that repeats
value
,repeatCount
times
-
concat
static CloseablePrimitiveIteratorOfDouble concat(@NotNull @NotNull CloseablePrimitiveIteratorOfDouble... subIterators) Create a CloseablePrimitiveIteratorOfDouble that concatenates an array of non-null
subIterators
. The result only needs to beclosed
if any of thesubIterators
require 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-null
CloseablePrimitiveIteratorOfDouble 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
-