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