public class DataTable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
columnnames
The table column names.
|
protected java.util.Map |
columns
The map of column indices.
|
protected java.lang.String |
name
The table name.
|
protected java.util.List |
rows
The data rows.
|
Constructor and Description |
---|
DataTable(java.lang.String name,
java.lang.String[] columnnames)
Create a new data table.
|
Modifier and Type | Method and Description |
---|---|
void |
addRow(java.lang.Object[] row)
Add a data row.
|
int |
getColumnIndex(java.lang.String columnname)
Get the column index for a column name.
|
java.lang.String[] |
getColumnNames()
Get the columnnames.
|
java.lang.Object |
getData(int row,
int column)
Get the data element from a specific row and column.
|
java.lang.String |
getName()
Get the name.
|
java.util.List |
getRows()
Get the data rows.
|
protected java.lang.String name
protected java.lang.String[] columnnames
protected java.util.List rows
protected java.util.Map columns
public DataTable(java.lang.String name, java.lang.String[] columnnames)
public void addRow(java.lang.Object[] row)
row
- The data row.public java.util.List getRows()
public java.lang.String[] getColumnNames()
public int getColumnIndex(java.lang.String columnname)
columnname
- The column name.public java.lang.Object getData(int row, int column)
public java.lang.String getName()