Interface CloseablePrimitiveIteratorOfDouble

All Superinterfaces:
AutoCloseable, CloseableIterator<Double>, CloseablePrimitiveIterator<Double,DoubleConsumer>, Iterator<Double>, PrimitiveIterator<Double,DoubleConsumer>, PrimitiveIterator.OfDouble, SafeCloseable
All Known Subinterfaces:
DoubleColumnIterator
All Known Implementing Classes:
ChunkedDoubleColumnIterator, SerialDoubleColumnIterator

public interface CloseablePrimitiveIteratorOfDouble extends PrimitiveIterator.OfDouble, CloseablePrimitiveIterator<Double,DoubleConsumer>
Closeable primitive iterator over elements of type double.
  • Field Details

  • Method Details

    • doubleStream

      default DoubleStream doubleStream()
      Create a DoubleStream over the remaining elements of this CloseablePrimitiveIteratorOfDouble. Closing the result will close this CloseablePrimitiveIteratorOfDouble.
      Returns:
      A DoubleStream over the remaining contents of this iterator
    • empty

      Get a CloseablePrimitiveIteratorOfDouble with no elements. The result does not need to be closed.
      Returns:
      A CloseablePrimitiveIteratorOfDouble with no elements
    • of

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

      static CloseablePrimitiveIteratorOfDouble repeat(double value, long repeatCount)
      Create a CloseablePrimitiveIteratorOfDouble 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 CloseablePrimitiveIteratorOfDouble that repeats value, repeatCount times
    • concat

      static CloseablePrimitiveIteratorOfDouble concat(@NotNull @NotNull CloseablePrimitiveIteratorOfDouble... subIterators)
      Create a CloseablePrimitiveIteratorOfDouble 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 CloseablePrimitiveIteratorOfDouble concatenating all elements from subIterators
    • maybeConcat

      static CloseablePrimitiveIteratorOfDouble maybeConcat(@Nullable @Nullable CloseablePrimitiveIteratorOfDouble first, @Nullable @Nullable CloseablePrimitiveIteratorOfDouble second, @Nullable @Nullable CloseablePrimitiveIteratorOfDouble third)
      Return a CloseablePrimitiveIteratorOfDouble that concatenates the contents of any non-null CloseablePrimitiveIteratorOfDouble 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 CloseablePrimitiveIteratorOfDouble that concatenates all elements as specified