public class TableInfo
extends java.lang.Object
Constructor and Description |
---|
TableInfo(java.lang.String tablename,
int capacity)
The constructor creates a new table information object with the specified number of columns.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String column)
Adds a column into the table's definition.
|
java.lang.String |
getColumn(int index)
Gets name of the column for the specified index in the table's definition.
|
java.lang.String[] |
getColumnNames()
Gets the column names in the table's definition.
|
int |
getLength()
Gets the maximum number of columns the table has.
|
java.lang.String |
getTableName()
Gets the table's name.
|
public TableInfo(java.lang.String tablename, int capacity)
tablename
- The table's name.capacity
- The initial number of columns in the table.
Uses getLength
to get the actual number of the columns.public void add(java.lang.String column)
column
- Specifies the column's name.public java.lang.String getTableName()
public java.lang.String[] getColumnNames()
public int getLength()
public java.lang.String getColumn(int index)
index
- The index of the column in the table's definition.getLength()