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