Interface CloseablePrimitiveIteratorOfInt
- All Superinterfaces:
AutoCloseable,CloseableIterator<Integer>,CloseablePrimitiveIterator<Integer,,IntConsumer> Iterator<Integer>,PrimitiveIterator<Integer,,IntConsumer> PrimitiveIterator.OfInt
- All Known Subinterfaces:
IntegerColumnIterator,ValueIteratorOfInt
- 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
FieldsModifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfIntA re-usable, immutable CloseablePrimitiveIteratorOfInt with no elements. -
Method Summary
Modifier and TypeMethodDescriptionconcat(@NotNull CloseablePrimitiveIteratorOfInt... subIterators) Create a CloseablePrimitiveIteratorOfInt that concatenates an array of non-nullsubIterators.empty()Get a CloseablePrimitiveIteratorOfInt with no elements.default IntStreamCreate aIntStreamover 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-nullCloseablePrimitiveIteratorOfInt 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,repeatCounttimes.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close, streamMethods 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 aIntStreamover the remaining elements of this CloseablePrimitiveIteratorOfInt. Closing the result will close this CloseablePrimitiveIteratorOfInt.- Returns:
- A
IntStreamover 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,repeatCounttimes. The result does not need to beclosed.- Parameters:
value- The value to repeatrepeatCount- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfInt that repeats
value,repeatCounttimes
-
concat
static CloseablePrimitiveIteratorOfInt concat(@NotNull @NotNull CloseablePrimitiveIteratorOfInt... subIterators) Create a CloseablePrimitiveIteratorOfInt 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 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-nullCloseablePrimitiveIteratorOfInt 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
-