Interface CloseablePrimitiveIteratorOfByte
- All Superinterfaces:
AutoCloseable,CloseableIterator<Byte>,CloseablePrimitiveIterator<Byte,,ByteConsumer> Iterator<Byte>,PrimitiveIterator<Byte,ByteConsumer>
- All Known Subinterfaces:
ByteColumnIterator,ValueIteratorOfByte
- All Known Implementing Classes:
ChunkedByteColumnIterator,SerialByteColumnIterator
public interface CloseablePrimitiveIteratorOfByte
extends CloseablePrimitiveIterator<Byte,ByteConsumer>
Closeable primitive iterator over elements of type byte.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfByteA re-usable, immutable CloseablePrimitiveIteratorOfByte with no elements. -
Method Summary
Modifier and TypeMethodDescriptiondefault CloseablePrimitiveIteratorOfIntadaptToOfInt(@NotNull ByteToIntFunction adapter) Adapt this CloseablePrimitiveIteratorOfByte to aCloseablePrimitiveIteratorOfInt, applyingadapterto each element.concat(@NotNull CloseablePrimitiveIteratorOfByte... subIterators) Create a CloseablePrimitiveIteratorOfByte that concatenates an array of non-nullsubIterators.empty()Get a CloseablePrimitiveIteratorOfByte with no elements.default voidforEachRemaining(@NotNull ByteConsumer action) default voidforEachRemaining(@NotNull Consumer<? super Byte> action) maybeConcat(@Nullable CloseablePrimitiveIteratorOfByte first, @Nullable CloseablePrimitiveIteratorOfByte second, @Nullable CloseablePrimitiveIteratorOfByte third) Return a CloseablePrimitiveIteratorOfByte that concatenates the contents of any non-nullCloseablePrimitiveIteratorOfByte found amongstfirst,second, andthird.default Bytenext()bytenextByte()Returns the nextbyteelement in the iteration.of(@org.jetbrains.annotations.NotNull byte... values) Create a CloseablePrimitiveIteratorOfByte over an array ofbyte.repeat(byte value, long repeatCount) Create a CloseablePrimitiveIteratorOfByte that repeatsvalue,repeatCounttimes.default IntStreamCreate aIntStreamover the remaining elements of this CloseablePrimitiveIteratorOfByte by applying an implementation-defined default adapter to each element.default IntStreamstreamAsInt(@NotNull ByteToIntFunction adapter) Create aIntStreamover the remaining elements of this CloseablePrimitiveIteratorOfByte by applyingadapterto each element.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close, stream
-
Field Details
-
EMPTY
A re-usable, immutable CloseablePrimitiveIteratorOfByte with no elements.
-
-
Method Details
-
nextByte
byte nextByte()Returns the nextbyteelement in the iteration.- Returns:
- The next
byteelement in the iteration - Throws:
NoSuchElementException- if the iteration has no more elements
-
forEachRemaining
- Specified by:
forEachRemainingin interfacePrimitiveIterator<Byte,ByteConsumer>
-
next
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<Byte>
-
adaptToOfInt
Adapt this CloseablePrimitiveIteratorOfByte to aCloseablePrimitiveIteratorOfInt, applyingadapterto each element. Closing the result will close this CloseablePrimitiveIteratorOfByte.- Parameters:
adapter- The adapter to apply- Returns:
- The adapted primitive iterator
-
streamAsInt
Create aIntStreamover the remaining elements of this CloseablePrimitiveIteratorOfByte by applyingadapterto each element. Closing the result will close this CloseablePrimitiveIteratorOfByte.- Returns:
- A
IntStreamover the remaining contents of this iterator
-
streamAsInt
Create aIntStreamover the remaining elements of this CloseablePrimitiveIteratorOfByte by applying an implementation-defined default adapter to each element. The default implementation applies a simpleintcast. Closing the result will close this CloseablePrimitiveIteratorOfByte.- Returns:
- A
IntStreamover the remaining contents of this iterator
-
empty
Get a CloseablePrimitiveIteratorOfByte with no elements. The result does not need to beclosed.- Returns:
- A CloseablePrimitiveIteratorOfByte with no elements
-
of
static CloseablePrimitiveIteratorOfByte of(@NotNull @org.jetbrains.annotations.NotNull byte... values) Create a CloseablePrimitiveIteratorOfByte over an array ofbyte. The result does not need to beclosed.- Parameters:
values- The elements to iterate- Returns:
- A CloseablePrimitiveIteratorOfByte of
values
-
repeat
Create a CloseablePrimitiveIteratorOfByte that repeatsvalue,repeatCounttimes. The result does not need to beclosed.- Parameters:
value- The value to repeatrepeatCount- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfByte that repeats
value,repeatCounttimes
-
concat
static CloseablePrimitiveIteratorOfByte concat(@NotNull @NotNull CloseablePrimitiveIteratorOfByte... subIterators) Create a CloseablePrimitiveIteratorOfByte 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 CloseablePrimitiveIteratorOfByte concatenating all elements from
subIterators
-
maybeConcat
static CloseablePrimitiveIteratorOfByte maybeConcat(@Nullable @Nullable CloseablePrimitiveIteratorOfByte first, @Nullable @Nullable CloseablePrimitiveIteratorOfByte second, @Nullable @Nullable CloseablePrimitiveIteratorOfByte third) Return a CloseablePrimitiveIteratorOfByte that concatenates the contents of any non-nullCloseablePrimitiveIteratorOfByte 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 CloseablePrimitiveIteratorOfByte that concatenates all elements as specified
-