Interface ValueIterator<TYPE>

All Superinterfaces:
AutoCloseable, CloseableIterator<TYPE>, Iterator<TYPE>
All Known Subinterfaces:
ByteColumnIterator, CharacterColumnIterator, ColumnIterator<DATA_TYPE>, DoubleColumnIterator, FloatColumnIterator, IntegerColumnIterator, LongColumnIterator, ObjectColumnIterator<DATA_TYPE>, ShortColumnIterator, ValueIteratorOfByte, ValueIteratorOfChar, ValueIteratorOfDouble, ValueIteratorOfFloat, ValueIteratorOfInt, ValueIteratorOfLong, ValueIteratorOfShort
All Known Implementing Classes:
ChunkedByteColumnIterator, ChunkedCharacterColumnIterator, ChunkedColumnIterator, ChunkedDoubleColumnIterator, ChunkedFloatColumnIterator, ChunkedIntegerColumnIterator, ChunkedLongColumnIterator, ChunkedObjectColumnIterator, ChunkedShortColumnIterator, SerialByteColumnIterator, SerialCharacterColumnIterator, SerialColumnIterator, SerialDoubleColumnIterator, SerialFloatColumnIterator, SerialIntegerColumnIterator, SerialLongColumnIterator, SerialObjectColumnIterator, SerialShortColumnIterator

public interface ValueIterator<TYPE> extends CloseableIterator<TYPE>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ValueIterator<?>
    A re-usable, immutable ValueIterator with no elements.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <TYPE> ValueIterator<TYPE>
    Get a ValueIterator with no elements.
    static <TYPE> ValueIterator<TYPE>
    of(@NotNull TYPE... values)
    Create a ValueIterator over an array of TYPE.
    long
     
    default Stream<TYPE>
    Create a Stream over the remaining elements of this ValueIterator.
    static <TYPE> ValueIterator<TYPE>
    wrapWithNulls(@Nullable ValueIterator<TYPE> iterator, long prefixNulls, long postfixNulls)
    Wraps a ValueIterator with set number of prefix nulls, postfix nulls, or both.

    Methods inherited from interface io.deephaven.engine.primitive.iterator.CloseableIterator

    close

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove
  • Field Details

    • EMPTY

      static final ValueIterator<?> EMPTY
      A re-usable, immutable ValueIterator with no elements.
  • Method Details

    • remaining

      long remaining()
      Returns:
      The number of elements remaining in this ValueIterator
    • stream

      default Stream<TYPE> stream()
      Create a Stream over the remaining elements of this ValueIterator. 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<TYPE>
      Returns:
      A Stream over the remaining contents of this iterator. Must be closed.
    • empty

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

      static <TYPE> ValueIterator<TYPE> of(@NotNull @NotNull TYPE... values)
      Create a ValueIterator over an array of TYPE. The result does not need to be closed.
      Parameters:
      values - The elements to iterate
      Returns:
      A ValueIterator of values
    • wrapWithNulls

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