Class RowSetFactory

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

public abstract class RowSetFactory extends Object
Repository of factory methods for constructing row sets.
  • Method Details

    • empty

      public static WritableRowSet empty()
      Get an empty WritableRowSet.
      Returns:
      A new WritableRowSet containing no rows
    • fromKeys

      public static WritableRowSet fromKeys(long... rowKeys)
      Get a WritableRowSet containing the specified row keys. Row keys must be nonnegative numbers.
      Parameters:
      rowKeys - The row keys to include
      Returns:
      A new WritableRowSet containing the specified row keys
    • fromKeys

      public static WritableRowSet fromKeys(long rowKey)
      Produce a WritableRowSet containing a single row key. Row keys must be nonnegative numbers.
      Parameters:
      rowKey - The row key to include
      Returns:
      A new WritableRowSet containing the specified row key
    • fromRange

      public static WritableRowSet fromRange(long firstRowKey, long lastRowKey)
      Create a WritableRowSet containing the continuous range [firstRowKey, lastRowKey].
      Parameters:
      firstRowKey - The first row key in the continuous range
      lastRowKey - The last row key in the continuous range
      Returns:
      A new WritableRowSet containing the specified row key range
    • flat

      public static WritableRowSet flat(long size)
      Get a flat WritableRowSet containing the row key range [0, size), or an empty row set if size <= 0.
      Parameters:
      size - The size of the WritableRowSet to create
      Returns:
      A flat WritableRowSet containing the row key range [0, size) or an empty row set if the size <= 0
    • builderRandom

      public static RowSetBuilderRandom builderRandom()
      Returns:
      A RowSetBuilderRandom suitable for inserting row keys and row key ranges in no particular order
    • builderSequential

      public static RowSetBuilderSequential builderSequential()
      Returns:
      A RowSetBuilderRandom optimized for inserting row keys and row key ranges sequentially in order