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.
  • Field Details

  • Method Details

    • nextFloat

      float nextFloat()
      Returns the next float element in the iteration.
      Returns:
      The next float element in the iteration
      Throws:
      NoSuchElementException - if the iteration has no more elements
    • forEachRemaining

      default void forEachRemaining(@NotNull @NotNull FloatConsumer action)
      Specified by:
      forEachRemaining in interface PrimitiveIterator<Float,FloatConsumer>
    • next

      default Float next()
      Specified by:
      next in interface Iterator<Float>
    • forEachRemaining

      default void forEachRemaining(@NotNull @NotNull Consumer<? super Float> action)
      Specified by:
      forEachRemaining in interface Iterator<Float>
    • adaptToOfDouble

      default CloseablePrimitiveIteratorOfDouble adaptToOfDouble(@NotNull @NotNull FloatToDoubleFunction adapter)
      Adapt this CloseablePrimitiveIteratorOfFloat to a CloseablePrimitiveIteratorOfDouble, applying adapter to each element. Closing the result will close this CloseablePrimitiveIteratorOfFloat.
      Parameters:
      adapter - The adapter to apply
      Returns:
      The adapted primitive iterator
    • streamAsDouble

      default DoubleStream streamAsDouble(@NotNull @NotNull FloatToDoubleFunction adapter)
      Create a DoubleStream over the remaining elements of this CloseablePrimitiveIteratorOfFloat by applying adapter to each element. Closing the result will close this CloseablePrimitiveIteratorOfFloat.
      Returns:
      A DoubleStream over the remaining contents of this iterator
    • streamAsDouble

      default DoubleStream streamAsDouble()
      Create a DoubleStream over the remaining elements of this CloseablePrimitiveIteratorOfFloat by applying an implementation-defined default adapter to each element. The default implementation applies a simple double 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 be closed.
      Returns:
      A CloseablePrimitiveIteratorOfFloat with no elements
    • of

      static CloseablePrimitiveIteratorOfFloat of(@NotNull @org.jetbrains.annotations.NotNull float... values)
      Create a CloseablePrimitiveIteratorOfFloat over an array of float. The result does not need to be closed.
      Parameters:
      values - The elements to iterate
      Returns:
      A CloseablePrimitiveIteratorOfFloat of values
    • repeat

      static CloseablePrimitiveIteratorOfFloat repeat(float value, long repeatCount)
      Create a CloseablePrimitiveIteratorOfFloat that repeats value, repeatCount times. The result does not need to be closed.
      Parameters:
      value - The value to repeat
      repeatCount - 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 be closed if any of the subIterators require it.
      Parameters:
      subIterators - The iterators to concatenate, none of which should be null. 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 amongst first, second, and third.
      Parameters:
      first - The first iterator to consider concatenating
      second - The second iterator to consider concatenating
      third - The third iterator to consider concatenating
      Returns:
      A CloseablePrimitiveIteratorOfFloat that concatenates all elements as specified