Interface CloseablePrimitiveIteratorOfLong
- All Superinterfaces:
AutoCloseable
,CloseableIterator<Long>
,CloseablePrimitiveIterator<Long,
,LongConsumer> Iterator<Long>
,PrimitiveIterator<Long,
,LongConsumer> PrimitiveIterator.OfLong
- All Known Subinterfaces:
LongColumnIterator
- All Known Implementing Classes:
ChunkedLongColumnIterator
,SerialLongColumnIterator
public interface CloseablePrimitiveIteratorOfLong
extends PrimitiveIterator.OfLong, CloseablePrimitiveIterator<Long,LongConsumer>
Closeable primitive iterator
over elements of type long
.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfLong
A re-usable, immutable CloseablePrimitiveIteratorOfLong with no elements. -
Method Summary
Modifier and TypeMethodDescriptionconcat
(@NotNull CloseablePrimitiveIteratorOfLong... subIterators) Create a CloseablePrimitiveIteratorOfLong that concatenates an array of non-null
subIterators
.empty()
Get a CloseablePrimitiveIteratorOfLong with no elements.default LongStream
Create aLongStream
over the remaining elements of this CloseablePrimitiveIteratorOfLong.maybeConcat
(@Nullable CloseablePrimitiveIteratorOfLong first, @Nullable CloseablePrimitiveIteratorOfLong second, @Nullable CloseablePrimitiveIteratorOfLong third) Return a CloseablePrimitiveIteratorOfLong that concatenates the contents of any non-null
CloseablePrimitiveIteratorOfLong found amongstfirst
,second
, andthird
.of
(@org.jetbrains.annotations.NotNull long... values) Create a CloseablePrimitiveIteratorOfLong over an array oflong
.repeat
(long value, long repeatCount) Create a CloseablePrimitiveIteratorOfLong that repeatsvalue
,repeatCount
times.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close, stream
Methods inherited from interface java.util.PrimitiveIterator.OfLong
forEachRemaining, forEachRemaining, next, nextLong
-
Field Details
-
EMPTY
A re-usable, immutable CloseablePrimitiveIteratorOfLong with no elements.
-
-
Method Details
-
longStream
Create aLongStream
over the remaining elements of this CloseablePrimitiveIteratorOfLong. Closing the result will close this CloseablePrimitiveIteratorOfLong.- Returns:
- A
LongStream
over the remaining contents of this iterator
-
empty
Get a CloseablePrimitiveIteratorOfLong with no elements. The result does not need to beclosed
.- Returns:
- A CloseablePrimitiveIteratorOfLong with no elements
-
of
static CloseablePrimitiveIteratorOfLong of(@NotNull @org.jetbrains.annotations.NotNull long... values) Create a CloseablePrimitiveIteratorOfLong over an array oflong
. The result does not need to beclosed
.- Parameters:
values
- The elements to iterate- Returns:
- A CloseablePrimitiveIteratorOfLong of
values
-
repeat
Create a CloseablePrimitiveIteratorOfLong that repeatsvalue
,repeatCount
times. The result does not need to beclosed
.- Parameters:
value
- The value to repeatrepeatCount
- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfLong that repeats
value
,repeatCount
times
-
concat
static CloseablePrimitiveIteratorOfLong concat(@NotNull @NotNull CloseablePrimitiveIteratorOfLong... subIterators) Create a CloseablePrimitiveIteratorOfLong 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 CloseablePrimitiveIteratorOfLong concatenating all elements from
subIterators
-
maybeConcat
static CloseablePrimitiveIteratorOfLong maybeConcat(@Nullable @Nullable CloseablePrimitiveIteratorOfLong first, @Nullable @Nullable CloseablePrimitiveIteratorOfLong second, @Nullable @Nullable CloseablePrimitiveIteratorOfLong third) Return a CloseablePrimitiveIteratorOfLong that concatenates the contents of any non-null
CloseablePrimitiveIteratorOfLong 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 CloseablePrimitiveIteratorOfLong that concatenates all elements as specified
-