Class IndexedDataColumn<TYPE>

java.lang.Object
io.deephaven.engine.table.impl.IndexedDataColumn<TYPE>
All Implemented Interfaces:
DataColumn<TYPE>, LongSizedDataStructure

public class IndexedDataColumn<TYPE> extends Object implements DataColumn<TYPE>
DataColumn implementation backed by a ColumnSource and a RowSet.
  • Constructor Details

    • IndexedDataColumn

      public IndexedDataColumn(@NotNull @NotNull String name, @NotNull @NotNull Table table)
    • IndexedDataColumn

      public IndexedDataColumn(@NotNull @NotNull String name, @NotNull @NotNull RowSet rowSet, @NotNull @NotNull ColumnSource<TYPE> columnSource)
  • Method Details

    • makePreviousColumn

      public static <TYPE> IndexedDataColumn<TYPE> makePreviousColumn(@NotNull @NotNull TrackingRowSet rowSet, @NotNull @NotNull ColumnSource<TYPE> columnSource)
      This is intended as a unit test helper. It is not recommended for inexpert use.
      Parameters:
      rowSet - The RowSet
      columnSource - The column source
      Returns:
      A data column with previous values for the supplied column source, according to the previous version of the RowSet
    • getName

      public String getName()
      Specified by:
      getName in interface DataColumn<TYPE>
    • getType

      public Class<TYPE> getType()
      Specified by:
      getType in interface DataColumn<TYPE>
      Returns:
      the type of object contained within this column.
    • getComponentType

      public Class<?> getComponentType()
      Description copied from interface: DataColumn
      Get the array component type, or the type itself. For basic types, this is just the type. For example, if you have a column of java.lang.String, this also returns java.lang.String. For array types (java Arrays), or Vector (which would be returned by getType), you get the type that is contained within the array. For example, if a single row in this column contains a DoubleVector, getComponentType returns double.
      Specified by:
      getComponentType in interface DataColumn<TYPE>
      Returns:
      if type is an array, the type of object within the array. Otherwise type itself.
    • size

      public long size()
      Description copied from interface: LongSizedDataStructure
      The size of this data structure.
      Specified by:
      size in interface LongSizedDataStructure
      Returns:
      The size
    • get

      public TYPE get(long pos)
      Description copied from interface: DataColumn
      Returns the value in the column at the row designated by the row position
      Specified by:
      get in interface DataColumn<TYPE>
      Parameters:
      pos - - the row position for which the data is being retrieved
      Returns:
      the value in the column at the row designated by the row position
    • get

      public TYPE[] get(long startPosInclusive, long endPosExclusive)
      Description copied from interface: DataColumn
      Return the column's values for the specified row range. Note that this will be a boxed array, for data columns of primitive types.
      Specified by:
      get in interface DataColumn<TYPE>
      Parameters:
      startPosInclusive - The first position in the data column to include, inclusive
      endPosExclusive - One more than the last position in the data column to include
      Returns:
      Return the column's values for the specified row range
    • get

      public TYPE[] get(long... positions)
      Description copied from interface: DataColumn
      Return the column's values for the specified rows. Note that this will be a boxed array, for data columns of primitive types.
      Specified by:
      get in interface DataColumn<TYPE>
      Parameters:
      positions - The row indexes to fetch
      Returns:
      Return the column's values for the specified rows
    • get

      public TYPE[] get(int... positions)
      Description copied from interface: DataColumn
      Return the column's values for the specified rows. Note that this will be a boxed array, for data columns of primitive types.
      Specified by:
      get in interface DataColumn<TYPE>
      Parameters:
      positions - The row indexes to fetch
      Returns:
      Return the column's values for the specified rows
    • getBoolean

      public Boolean getBoolean(long pos)
      Specified by:
      getBoolean in interface DataColumn<TYPE>
    • getBooleans

      public Boolean[] getBooleans(long startPosInclusive, long endPosExclusive)
      Specified by:
      getBooleans in interface DataColumn<TYPE>
    • getBooleans

      public Boolean[] getBooleans(long... positions)
      Specified by:
      getBooleans in interface DataColumn<TYPE>
    • getBooleans

      public Boolean[] getBooleans(int... positions)
      Specified by:
      getBooleans in interface DataColumn<TYPE>
    • getByte

      public byte getByte(long pos)
      Specified by:
      getByte in interface DataColumn<TYPE>
    • getBytes

      public byte[] getBytes(long startPosInclusive, long endPosExclusive)
      Specified by:
      getBytes in interface DataColumn<TYPE>
    • getBytes

      public byte[] getBytes(long... positions)
      Specified by:
      getBytes in interface DataColumn<TYPE>
    • getBytes

      public byte[] getBytes(int... positions)
      Specified by:
      getBytes in interface DataColumn<TYPE>
    • getChar

      public char getChar(long pos)
      Specified by:
      getChar in interface DataColumn<TYPE>
    • getChars

      public char[] getChars(long startPosInclusive, long endPosExclusive)
      Specified by:
      getChars in interface DataColumn<TYPE>
    • getChars

      public char[] getChars(long... positions)
      Specified by:
      getChars in interface DataColumn<TYPE>
    • getChars

      public char[] getChars(int... positions)
      Specified by:
      getChars in interface DataColumn<TYPE>
    • getDouble

      public double getDouble(long pos)
      Specified by:
      getDouble in interface DataColumn<TYPE>
    • getDoubles

      public double[] getDoubles(long startPosInclusive, long endPosExclusive)
      Specified by:
      getDoubles in interface DataColumn<TYPE>
    • getDoubles

      public double[] getDoubles(long... positions)
      Specified by:
      getDoubles in interface DataColumn<TYPE>
    • getDoubles

      public double[] getDoubles(int... positions)
      Specified by:
      getDoubles in interface DataColumn<TYPE>
    • getFloat

      public float getFloat(long pos)
      Specified by:
      getFloat in interface DataColumn<TYPE>
    • getFloats

      public float[] getFloats(long startPosInclusive, long endPosExclusive)
      Specified by:
      getFloats in interface DataColumn<TYPE>
    • getFloats

      public float[] getFloats(long... positions)
      Specified by:
      getFloats in interface DataColumn<TYPE>
    • getFloats

      public float[] getFloats(int... positions)
      Specified by:
      getFloats in interface DataColumn<TYPE>
    • getInt

      public int getInt(long pos)
      Specified by:
      getInt in interface DataColumn<TYPE>
    • getInts

      public int[] getInts(long startPosInclusive, long endPosExclusive)
      Specified by:
      getInts in interface DataColumn<TYPE>
    • getInts

      public int[] getInts(long... positions)
      Specified by:
      getInts in interface DataColumn<TYPE>
    • getInts

      public int[] getInts(int... positions)
      Specified by:
      getInts in interface DataColumn<TYPE>
    • getLong

      public long getLong(long pos)
      Specified by:
      getLong in interface DataColumn<TYPE>
    • getLongs

      public long[] getLongs(long startPosInclusive, long endPosExclusive)
      Specified by:
      getLongs in interface DataColumn<TYPE>
    • getLongs

      public long[] getLongs(long... positions)
      Specified by:
      getLongs in interface DataColumn<TYPE>
    • getLongs

      public long[] getLongs(int... positions)
      Specified by:
      getLongs in interface DataColumn<TYPE>
    • getShort

      public short getShort(long pos)
      Specified by:
      getShort in interface DataColumn<TYPE>
    • getShorts

      public short[] getShorts(long startPosInclusive, long endPosExclusive)
      Specified by:
      getShorts in interface DataColumn<TYPE>
    • getShorts

      public short[] getShorts(long... positions)
      Specified by:
      getShorts in interface DataColumn<TYPE>
    • getShorts

      public short[] getShorts(int... positions)
      Specified by:
      getShorts in interface DataColumn<TYPE>