Interface CloseablePrimitiveIteratorOfLong
- All Superinterfaces:
AutoCloseable,CloseableIterator<Long>,CloseablePrimitiveIterator<Long,,LongConsumer> Iterator<Long>,PrimitiveIterator<Long,,LongConsumer> PrimitiveIterator.OfLong
- All Known Subinterfaces:
LongColumnIterator,ValueIteratorOfLong
- 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
FieldsModifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfLongA re-usable, immutable CloseablePrimitiveIteratorOfLong with no elements. -
Method Summary
Modifier and TypeMethodDescriptionconcat(@NotNull CloseablePrimitiveIteratorOfLong... subIterators) Create a CloseablePrimitiveIteratorOfLong that concatenates an array of non-nullsubIterators.empty()Get a CloseablePrimitiveIteratorOfLong with no elements.default LongStreamCreate aLongStreamover 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-nullCloseablePrimitiveIteratorOfLong 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,repeatCounttimes.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close, streamMethods 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 aLongStreamover the remaining elements of this CloseablePrimitiveIteratorOfLong. Closing the result will close this CloseablePrimitiveIteratorOfLong.- Returns:
- A
LongStreamover 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,repeatCounttimes. The result does not need to beclosed.- Parameters:
value- The value to repeatrepeatCount- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfLong that repeats
value,repeatCounttimes
-
concat
static CloseablePrimitiveIteratorOfLong concat(@NotNull @NotNull CloseablePrimitiveIteratorOfLong... subIterators) Create a CloseablePrimitiveIteratorOfLong 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 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-nullCloseablePrimitiveIteratorOfLong 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
-