Interface CloseablePrimitiveIteratorOfFloat
- All Superinterfaces:
AutoCloseable,CloseableIterator<Float>,CloseablePrimitiveIterator<Float,,FloatConsumer> Iterator<Float>,PrimitiveIterator<Float,FloatConsumer>
- All Known Subinterfaces:
FloatColumnIterator,ValueIteratorOfFloat
- 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
FieldsModifier and TypeFieldDescriptionstatic final CloseablePrimitiveIteratorOfFloatA re-usable, immutable CloseablePrimitiveIteratorOfFloat with no elements. -
Method Summary
Modifier and TypeMethodDescriptionadaptToOfDouble(@NotNull FloatToDoubleFunction adapter) Adapt this CloseablePrimitiveIteratorOfFloat to aCloseablePrimitiveIteratorOfDouble, applyingadapterto each element.concat(@NotNull CloseablePrimitiveIteratorOfFloat... subIterators) Create a CloseablePrimitiveIteratorOfFloat that concatenates an array of non-nullsubIterators.empty()Get a CloseablePrimitiveIteratorOfFloat with no elements.default voidforEachRemaining(@NotNull FloatConsumer action) default voidforEachRemaining(@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-nullCloseablePrimitiveIteratorOfFloat found amongstfirst,second, andthird.default Floatnext()floatReturns the nextfloatelement 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,repeatCounttimes.default DoubleStreamCreate aDoubleStreamover the remaining elements of this CloseablePrimitiveIteratorOfFloat by applying an implementation-defined default adapter to each element.default DoubleStreamstreamAsDouble(@NotNull FloatToDoubleFunction adapter) Create aDoubleStreamover the remaining elements of this CloseablePrimitiveIteratorOfFloat by applyingadapterto 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 nextfloatelement in the iteration.- Returns:
- The next
floatelement in the iteration - Throws:
NoSuchElementException- if the iteration has no more elements
-
forEachRemaining
- Specified by:
forEachRemainingin interfacePrimitiveIterator<Float,FloatConsumer>
-
next
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceIterator<Float>
-
adaptToOfDouble
default CloseablePrimitiveIteratorOfDouble adaptToOfDouble(@NotNull @NotNull FloatToDoubleFunction adapter) Adapt this CloseablePrimitiveIteratorOfFloat to aCloseablePrimitiveIteratorOfDouble, applyingadapterto each element. Closing the result will close this CloseablePrimitiveIteratorOfFloat.- Parameters:
adapter- The adapter to apply- Returns:
- The adapted primitive iterator
-
streamAsDouble
Create aDoubleStreamover the remaining elements of this CloseablePrimitiveIteratorOfFloat by applyingadapterto each element. Closing the result will close this CloseablePrimitiveIteratorOfFloat.- Returns:
- A
DoubleStreamover the remaining contents of this iterator
-
streamAsDouble
Create aDoubleStreamover the remaining elements of this CloseablePrimitiveIteratorOfFloat by applying an implementation-defined default adapter to each element. The default implementation applies a simpledoublecast. Closing the result will close this CloseablePrimitiveIteratorOfFloat.- Returns:
- A
DoubleStreamover 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,repeatCounttimes. The result does not need to beclosed.- Parameters:
value- The value to repeatrepeatCount- The number of repetitions- Returns:
- A CloseablePrimitiveIteratorOfFloat that repeats
value,repeatCounttimes
-
concat
static CloseablePrimitiveIteratorOfFloat concat(@NotNull @NotNull CloseablePrimitiveIteratorOfFloat... subIterators) Create a CloseablePrimitiveIteratorOfFloat 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 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-nullCloseablePrimitiveIteratorOfFloat 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
-