Interface CloseablePrimitiveIteratorOfInt

All Superinterfaces:
AutoCloseable, CloseableIterator<Integer>, CloseablePrimitiveIterator<Integer,IntConsumer>, Iterator<Integer>, PrimitiveIterator<Integer,IntConsumer>, PrimitiveIterator.OfInt
All Known Subinterfaces:
IntegerColumnIterator
All Known Implementing Classes:
ChunkedIntegerColumnIterator, SerialIntegerColumnIterator

public interface CloseablePrimitiveIteratorOfInt extends PrimitiveIterator.OfInt, CloseablePrimitiveIterator<Integer,IntConsumer>
Closeable primitive iterator over elements of type int.
  • Field Details

  • Method Details

    • intStream

      default IntStream intStream()
      Create a IntStream over the remaining elements of this CloseablePrimitiveIteratorOfInt. Closing the result will close this CloseablePrimitiveIteratorOfInt.
      Returns:
      A IntStream over the remaining contents of this iterator
    • empty

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

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

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

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

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