|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgov.usda.gdpc.util.AbstractTable
This class provides a skeletal implementation of the Table interface to minimize the effort required to implement this interface.
| Constructor Summary | |
AbstractTable()
|
|
AbstractTable(java.util.List columnHeadings,
java.util.List rowHeadings,
java.lang.Object[][] data)
AbstractTable constructor. |
|
| Method Summary | |
java.lang.Object |
get(int columnIndex,
int rowIndex)
Get the data associated with the specified indices. |
java.lang.Object |
get(java.lang.Object columnHeading,
java.lang.Object rowHeading)
Get the data associated with specified column heading and row heading. |
java.lang.Object[] |
getColumn(int columnIndex)
Get the column for the given column index. |
java.lang.Object[] |
getColumn(java.lang.Object columnHeading)
Get the column for the given column heading. |
java.lang.Object |
getColumnHeading(int index)
Get the column heading at specified index. |
java.lang.Object[] |
getColumnHeadings()
Get column headings for this table. |
java.lang.Object[] |
getRow(int rowIndex)
Get the row for the given row index. |
java.lang.Object[] |
getRow(java.lang.Object rowHeading)
Get the row for the given row heading. |
java.lang.Object |
getRowHeading(int index)
Get row heading at specified index. |
java.lang.Object[] |
getRowHeadings()
Get row headings for this table. |
int |
numColumns()
Returns number of columns in this table. |
int |
numRows()
Returns number of rows in this table. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AbstractTable()
public AbstractTable(java.util.List columnHeadings,
java.util.List rowHeadings,
java.lang.Object[][] data)
columnHeadings - list of column headings for this table.rowHeadings - list of row headings for this table.data - this table's data| Method Detail |
public java.lang.Object get(java.lang.Object columnHeading,
java.lang.Object rowHeading)
get in interface TablecolumnHeading - column headingrowHeading - row heading
public java.lang.Object[] getRow(java.lang.Object rowHeading)
getRow in interface TablerowHeading - row heading
public java.lang.Object[] getColumn(java.lang.Object columnHeading)
getColumn in interface TablecolumnHeading - column heading
public java.lang.Object[] getRow(int rowIndex)
getRow in interface TablerowIndex - row index
java.lang.IndexOutOfBoundsException - if the index is out of
range (rowIndex < 0 || rowIndex >= numRows()).public java.lang.Object[] getColumn(int columnIndex)
getColumn in interface TablecolumnIndex - column index
java.lang.IndexOutOfBoundsException - if the index is out of
range (columnIndex < 0 || columnIndex >= numColumns()).
public final java.lang.Object get(int columnIndex,
int rowIndex)
get in interface TablecolumnIndex - column indexrowIndex - row index
java.lang.IndexOutOfBoundsException - if the index is out of
range (columnIndex < 0 || columnIndex >= numColumns())
or (rowIndex < 0 || rowIndex >= numRows()).public final int numColumns()
numColumns in interface Tablepublic final int numRows()
numRows in interface Tablepublic java.lang.String toString()
public java.lang.Object getColumnHeading(int index)
getColumnHeading in interface Tableindex - column index
java.lang.IndexOutOfBoundsException - if the index is out of
range (index < 0 || index >= numColumns()).public java.lang.Object[] getColumnHeadings()
getColumnHeadings in interface Tablepublic java.lang.Object getRowHeading(int index)
getRowHeading in interface Tableindex - row index
java.lang.IndexOutOfBoundsException - if the index is out of
range (index < 0 || index >= numRows()).public java.lang.Object[] getRowHeadings()
getRowHeadings in interface Table
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||