Interface ValueIteratorOfChar
- All Superinterfaces:
AutoCloseable
,CloseableIterator<Character>
,CloseablePrimitiveIterator<Character,
,CharConsumer> CloseablePrimitiveIteratorOfChar
,Iterator<Character>
,PrimitiveIterator<Character,
,CharConsumer> ValueIterator<Character>
- All Known Subinterfaces:
CharacterColumnIterator
- All Known Implementing Classes:
ChunkedCharacterColumnIterator
,SerialCharacterColumnIterator
public interface ValueIteratorOfChar
extends CloseablePrimitiveIteratorOfChar, ValueIterator<Character>
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ValueIteratorOfChar
A re-usable, immutable ValueIteratorOfChar with no elements. -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueIteratorOfChar
empty()
Get a ValueIteratorOfChar with no elements.default void
forEachRemaining
(@NotNull Consumer<? super Character> action) default Character
next()
static ValueIteratorOfChar
of
(@org.jetbrains.annotations.NotNull char... values) Create a ValueIteratorOfChar over an array ofchar
.default IntStream
default IntStream
streamAsInt
(@NotNull CharToIntFunction adapter) Create anIntStream
over the remaining elements of this ValueIteratorOfChar by applyingadapter
to each element.static ValueIteratorOfChar
wrapWithNulls
(@Nullable ValueIteratorOfChar iterator, long prefixNulls, long postfixNulls) Wraps a ValueIteratorOfChar with set number of prefix nulls, postfix nulls, or both.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close
Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseablePrimitiveIteratorOfChar
adaptToOfInt, forEachRemaining, nextChar
Methods inherited from interface io.deephaven.engine.primitive.value.iterator.ValueIterator
remaining, stream
-
Field Details
-
EMPTY
A re-usable, immutable ValueIteratorOfChar with no elements.
-
-
Method Details
-
next
- Specified by:
next
in interfaceCloseablePrimitiveIteratorOfChar
- Specified by:
next
in interfaceIterator<Character>
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceCloseablePrimitiveIteratorOfChar
- Specified by:
forEachRemaining
in interfaceIterator<Character>
-
streamAsInt
Create an unboxedIntStream
over the remaining elements of this ValueIteratorOfChar by casting each element toint
with the appropriate adjustment ofNULL_CHAR
toNULL_INT
. The result must beclosed
in order to ensure resources are released. A try-with-resources block is strongly encouraged.- Specified by:
streamAsInt
in interfaceCloseablePrimitiveIteratorOfChar
- Returns:
- An unboxed
IntStream
over the remaining contents of this iterator. Must beclosed
.
-
streamAsInt
Create anIntStream
over the remaining elements of this ValueIteratorOfChar by applyingadapter
to each element. The result must beclosed
in order to ensure resources are released. A try-with-resources block is strongly encouraged.- Specified by:
streamAsInt
in interfaceCloseablePrimitiveIteratorOfChar
- Returns:
- An
IntStream
over the remaining contents of this iterator. Must beclosed
.
-
empty
Get a ValueIteratorOfChar with no elements. The result does not need to beclosed
.- Returns:
- A ValueIteratorOfChar with no elements
-
of
Create a ValueIteratorOfChar over an array ofchar
. The result does not need to beclosed
.- Parameters:
values
- The elements to iterate- Returns:
- A ValueIteratorOfChar of
values
-
wrapWithNulls
static ValueIteratorOfChar wrapWithNulls(@Nullable @Nullable ValueIteratorOfChar iterator, long prefixNulls, long postfixNulls) Wraps a ValueIteratorOfChar with set number of prefix nulls, postfix nulls, or both. The result must beclosed
.- Parameters:
iterator
- The ValueIteratorOfChar to wrapprefixNulls
- The number of nulls to add to the beginning of the iteratorpostfixNulls
- The number of nulls to add to the end of the iterator- Returns:
- A ValueIteratorOfChar with the specified number of prefix and postfix nulls
-