Class RowSequenceFactory

java.lang.Object
io.deephaven.engine.rowset.RowSequenceFactory

public class RowSequenceFactory extends Object
Helper methods for constructing RowSequence instances.
  • Field Details

  • Constructor Details

    • RowSequenceFactory

      public RowSequenceFactory()
  • Method Details

    • wrapRowKeysChunkAsRowSequence

      public static RowSequence wrapRowKeysChunkAsRowSequence(LongChunk<OrderedRowKeys> longChunk)
      Wrap a LongChunk as an RowSequence.
      Parameters:
      longChunk - A chunk to wrap as a new RowSequence object.
      Returns:
      A new RowSequence object, who does not own the passed chunk.
    • wrapKeyRangesChunkAsRowSequence

      public static RowSequence wrapKeyRangesChunkAsRowSequence(LongChunk<OrderedRowKeyRanges> longChunk)
      Wrap a LongChunk as an RowSequence.
      Parameters:
      longChunk - A chunk to wrap as a new RowSequence object.
      Returns:
      A new RowSequence object, who does not own the passed chunk.
    • takeRowKeysChunkAndMakeRowSequence

      public static RowSequence takeRowKeysChunkAndMakeRowSequence(WritableLongChunk<OrderedRowKeys> longChunk)
      Create and return a new RowSequence object from the provided WritableLongChunk.
      Parameters:
      longChunk - The input chunk. The returned object will take ownership of this chunk.
      Returns:
      A new RowSequence object, who owns the passed chunk.
    • takeKeyRangesChunkAndMakeRowSequence

      public static RowSequence takeKeyRangesChunkAndMakeRowSequence(WritableLongChunk<OrderedRowKeyRanges> longChunk)
      Create and return a new RowSequence object from the provided WritableLongChunk.
      Parameters:
      longChunk - The input chunk. The returned object will take ownership of this chunk.
      Returns:
      A new RowSequence object, who owns the passed chunk.
    • flat

      public static RowSequence flat(long size)
      Get a flat RowSequence covering the row key range [0, size), or EMPTY if size == 0.
      Parameters:
      size - The number of row keys in the sequence
      Returns:
      A flat RowSequence covering the row key range [0, size), or EMPTY if size == 0
    • forRange

      public static RowSequence forRange(long firstRowKey, long lastRowKey)
      Create and return a new RowSequence object from the supplied closed range. The range must hold at least one row key: 0 <= firstRowKey <= lastRowKey.
      Parameters:
      firstRowKey - The first row key (inclusive) in the range
      lastRowKey - The last row key (inclusive) in the range
      Returns:
      A new RowSequence object covering the requested range of row keys