Interface ValueIteratorOfLong

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

public interface ValueIteratorOfLong extends CloseablePrimitiveIteratorOfLong, ValueIterator<Long>
  • Field Details

    • EMPTY

      static final ValueIteratorOfLong EMPTY
      A re-usable, immutable ValueIteratorOfLong with no elements.
  • Method Details

    • next

      @FinalDefault default Long next()
      Specified by:
      next in interface Iterator<Long>
      Specified by:
      next in interface PrimitiveIterator.OfLong
    • forEachRemaining

      @FinalDefault default void forEachRemaining(@NotNull @NotNull Consumer<? super Long> action)
      Specified by:
      forEachRemaining in interface Iterator<Long>
      Specified by:
      forEachRemaining in interface PrimitiveIterator.OfLong
    • longStream

      @FinalDefault default LongStream longStream()
      Create an unboxed LongStream over the remaining elements of this ValueIteratorOfLong. The result must be closed in order to ensure resources are released. A try-with-resources block is strongly encouraged.
      Specified by:
      longStream in interface CloseablePrimitiveIteratorOfLong
      Returns:
      An unboxed LongStream over the remaining contents of this iterator. Must be closed.
    • stream

      @FinalDefault default Stream<Long> stream()
      Create a boxed Stream over the remaining elements of this ValueIteratorOfLong. The result must be closed in order to ensure resources are released. A try-with-resources block is strongly encouraged.
      Specified by:
      stream in interface CloseableIterator<Long>
      Specified by:
      stream in interface ValueIterator<Long>
      Returns:
      A boxed Stream over the remaining contents of this iterator. Must be closed.
    • empty

      static ValueIteratorOfLong empty()
      Get a ValueIteratorOfLong with no elements. The result does not need to be closed.
      Returns:
      A ValueIteratorOfLong with no elements
    • of

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

      static ValueIteratorOfLong wrapWithNulls(@Nullable @Nullable ValueIteratorOfLong iterator, long prefixNulls, long postfixNulls)
      Wraps a ValueIteratorOfLong with set number of prefix nulls, postfix nulls, or both. The result must be closed.
      Parameters:
      iterator - The ValueIteratorOfLong to wrap
      prefixNulls - The number of nulls to add to the beginning of the iterator
      postfixNulls - The number of nulls to add to the end of the iterator
      Returns:
      A ValueIteratorOfLong with the specified number of prefix and postfix nulls