Interface CloseablePrimitiveIteratorOfFloat
- All Superinterfaces:
AutoCloseable
,CloseableIterator<Float>
,CloseablePrimitiveIterator<Float,
,FloatConsumer> Iterator<Float>
,PrimitiveIterator<Float,
FloatConsumer>
- All Known Subinterfaces:
FloatColumnIterator
- All Known Implementing Classes:
ChunkedFloatColumnIterator
,SerialFloatColumnIterator
public interface CloseablePrimitiveIteratorOfFloat
extends CloseablePrimitiveIterator<Float,FloatConsumer>
Closeable primitive iterator
over elements of type float
.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfFloat
A re-usable, immutable CloseablePrimitiveIteratorOfFloat with no elements. -
Method Summary
Modifier and TypeMethodDescriptionadaptToOfDouble
(@NotNull FloatToDoubleFunction adapter) Adapt this CloseablePrimitiveIteratorOfFloat to aCloseablePrimitiveIteratorOfDouble
, applyingadapter
to each element.concat
(@NotNull CloseablePrimitiveIteratorOfFloat... subIterators) Create a CloseablePrimitiveIteratorOfFloat that concatenates an array of non-null
subIterators
.empty()
Get a CloseablePrimitiveIteratorOfFloat with no elements.default void
forEachRemaining
(@NotNull FloatConsumer action) default void
forEachRemaining
(@NotNull Consumer<? super Float> action) maybeConcat
(@Nullable CloseablePrimitiveIteratorOfFloat first, @Nullable CloseablePrimitiveIteratorOfFloat second, @Nullable CloseablePrimitiveIteratorOfFloat third) Return a CloseablePrimitiveIteratorOfFloat that concatenates the contents of any non-null
CloseablePrimitiveIteratorOfFloat found amongstfirst
,second
, andthird
.default Float
next()
float
Returns the nextfloat
element in the iteration.of
(@org.jetbrains.annotations.NotNull float... values) Create a CloseablePrimitiveIteratorOfFloat over an array offloat
.repeat
(float value, long repeatCount) Create a CloseablePrimitiveIteratorOfFloat that repeatsvalue
,repeatCount
times.default DoubleStream
Create aDoubleStream
over the remaining elements of this CloseablePrimitiveIteratorOfFloat by applying an implementation-defined default adapter to each element.default DoubleStream
streamAsDouble
(@NotNull FloatToDoubleFunction adapter) Create aDoubleStream
over the remaining elements of this CloseablePrimitiveIteratorOfFloat by applyingadapter
to each element.Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator
close, stream
-
Field Details
-
EMPTY
A re-usable, immutable CloseablePrimitiveIteratorOfFloat with no elements.
-
-
Method Details
-
nextFloat
float nextFloat()Returns the nextfloat
element in the iteration.- Returns:
- The next
float
element in the iteration - Throws:
NoSuchElementException
- if the iteration has no more elements
-
forEachRemaining
- Specified by:
forEachRemaining
in interfacePrimitiveIterator<Float,
FloatConsumer>
-
next
-
forEachRemaining
- Specified by:
forEachRemaining
in interfaceIterator<Float>
-
adaptToOfDouble
default CloseablePrimitiveIteratorOfDouble adaptToOfDouble(@NotNull @NotNull FloatToDoubleFunction adapter) Adapt this CloseablePrimitiveIteratorOfFloat to aCloseablePrimitiveIteratorOfDouble
, applyingadapter
to each element. Closing the result will close this CloseablePrimitiveIteratorOfFloat.- Parameters:
adapter
- The adapter to apply- Returns:
- The adapted primitive iterator
-
streamAsDouble
Create aDoubleStream
over the remaining elements of this CloseablePrimitiveIteratorOfFloat by applyingadapter
to each element. Closing the result will close this CloseablePrimitiveIteratorOfFloat.- Returns:
- A
DoubleStream
over the remaining contents of this iterator
-
streamAsDouble
Create aDoubleStream
over the remaining elements of this CloseablePrimitiveIteratorOfFloat by applying an implementation-defined default adapter to each element. The default implementation applies a simpledouble
cast. Closing the result will close this CloseablePrimitiveIteratorOfFloat.- Returns:
- A
DoubleStream
over the remaining contents of this iterator
-
empty
Get a CloseablePrimitiveIteratorOfFloat with no elements. The result does not need to beclosed
.- Returns:
- A CloseablePrimitiveIteratorOfFloat with no elements
-
of
static CloseablePrimitiveIteratorOfFloat of(@NotNull @org.jetbrains.annotations.NotNull float... values) Create a CloseablePrimitiveIteratorOfFloat over an array offloat
. The result does not need to beclosed
.- Parameters:
values
- The elements to iterate- Returns:
- A CloseablePrimitiveIteratorOfFloat of
values
-
repeat
Create a CloseablePrimitiveIteratorOfFloat that repeatsvalue
,repeatCount
times. The result does not need to beclosed
.- Parameters:
value
- The value to repeatrepeatCount
- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfFloat that repeats
value
,repeatCount
times
-
concat
static CloseablePrimitiveIteratorOfFloat concat(@NotNull @NotNull CloseablePrimitiveIteratorOfFloat... subIterators) Create a CloseablePrimitiveIteratorOfFloat that concatenates an array of non-null
subIterators
. The result only needs to beclosed
if any of thesubIterators
require 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 CloseablePrimitiveIteratorOfFloat concatenating all elements from
subIterators
-
maybeConcat
static CloseablePrimitiveIteratorOfFloat maybeConcat(@Nullable @Nullable CloseablePrimitiveIteratorOfFloat first, @Nullable @Nullable CloseablePrimitiveIteratorOfFloat second, @Nullable @Nullable CloseablePrimitiveIteratorOfFloat third) Return a CloseablePrimitiveIteratorOfFloat that concatenates the contents of any non-null
CloseablePrimitiveIteratorOfFloat 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 CloseablePrimitiveIteratorOfFloat that concatenates all elements as specified
-