Interface ValueIteratorOfInt

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

public interface ValueIteratorOfInt extends CloseablePrimitiveIteratorOfInt, ValueIterator<Integer>
  • Field Details

    • EMPTY

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

    • next

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

      @FinalDefault default void forEachRemaining(@NotNull @NotNull Consumer<? super Integer> action)
      Specified by:
      forEachRemaining in interface Iterator<Integer>
      Specified by:
      forEachRemaining in interface PrimitiveIterator.OfInt
    • intStream

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

      @FinalDefault default Stream<Integer> stream()
      Create a boxed Stream over the remaining elements of this DeephavenValueIteratorOfInt. 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<Integer>
      Specified by:
      stream in interface ValueIterator<Integer>
      Returns:
      A boxed Stream over the remaining contents of this iterator. Must be closed.
    • empty

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

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

      static ValueIteratorOfInt wrapWithNulls(@Nullable @Nullable ValueIteratorOfInt iterator, long prefixNulls, long postfixNulls)
      Wraps a ValueIteratorOfInt with set number of prefix nulls, postfix nulls, or both. The result must be closed.
      Parameters:
      iterator - The ValueIteratorOfInt 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 ValueIteratorOfInt with the specified number of prefix and postfix nulls