Interface CloseablePrimitiveIteratorOfLong

All Superinterfaces:
AutoCloseable, CloseableIterator<Long>, CloseablePrimitiveIterator<Long,LongConsumer>, Iterator<Long>, PrimitiveIterator<Long,LongConsumer>, PrimitiveIterator.OfLong
All Known Subinterfaces:
LongColumnIterator
All Known Implementing Classes:
ChunkedLongColumnIterator, SerialLongColumnIterator

public interface CloseablePrimitiveIteratorOfLong extends PrimitiveIterator.OfLong, CloseablePrimitiveIterator<Long,LongConsumer>
Closeable primitive iterator over elements of type long.
  • Field Details

  • Method Details

    • longStream

      default LongStream longStream()
      Create a LongStream over the remaining elements of this CloseablePrimitiveIteratorOfLong. Closing the result will close this CloseablePrimitiveIteratorOfLong.
      Returns:
      A LongStream over the remaining contents of this iterator
    • empty

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

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

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

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

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