Package uk.ac.starlink.ttools.taplint
Class TableData
java.lang.Object
uk.ac.starlink.ttools.taplint.TableData
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 Summary
Modifier and TypeMethodDescriptionstatic TableData
createTableData
(Reporter reporter, uk.ac.starlink.table.StarTable table) Adapts a StarTable to a TableData.abstract Object
getCell
(int irow, int icol) Returns the value of a cell.Object[]
getColumn
(int icol) Returns the content of one column of the table as an array.abstract int
Returns number of rows.uk.ac.starlink.table.StarTable
getTable()
Returns the table on which this object is based.
-
Method Details
-
getRowCount
public abstract int getRowCount()Returns number of rows.- Returns:
- row count, >=0
-
getCell
Returns the value of a cell.- Parameters:
irow
- row indexicol
- column index
-
getColumn
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
Adapts a StarTable to a TableData. In case of trouble, null is returned and messages are reported as appropriate.- Parameters:
reporter
- reportertable
- input table- Returns:
- table data
-