Class TableData

java.lang.Object
uk.ac.starlink.ttools.taplint.TableData

public abstract class TableData extends Object
Contains the data from a table in easy to digest form (no IOExceptions). Suitable for holding small tables.
Since:
9 Oct 2018
Author:
Mark Taylor
  • Method Details

    • getRowCount

      public abstract int getRowCount()
      Returns number of rows.
      Returns:
      row count, >=0
    • getCell

      public abstract Object getCell(int irow, int icol)
      Returns the value of a cell.
      Parameters:
      irow - row index
      icol - column index
    • getColumn

      public Object[] getColumn(int icol)
      Returns the content of one column of the table as an array.
      Parameters:
      icol - column index
      Returns:
      array with one element per table row
    • getTable

      public uk.ac.starlink.table.StarTable getTable()
      Returns the table on which this object is based.
      Returns:
      table
    • createTableData

      public static TableData createTableData(Reporter reporter, uk.ac.starlink.table.StarTable table)
      Adapts a StarTable to a TableData. In case of trouble, null is returned and messages are reported as appropriate.
      Parameters:
      reporter - reporter
      table - input table
      Returns:
      table data