gov.usda.gdpc
Interface Table

All Known Implementing Classes:
AbstractTable

public interface Table

Table of objects.

Author:
terryc

Method Summary
 java.lang.Object get(int column, int row)
          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.
 

Method Detail

get

public java.lang.Object get(java.lang.Object columnHeading,
                            java.lang.Object rowHeading)
Get the data associated with specified column heading and row heading.

Parameters:
columnHeading - column heading
rowHeading - row heading
Returns:
data. null if not found.

getRow

public java.lang.Object[] getRow(java.lang.Object rowHeading)
Get the row for the given row heading.

Parameters:
rowHeading - row heading
Returns:
data. null if not found.

getColumn

public java.lang.Object[] getColumn(java.lang.Object columnHeading)
Get the column for the given column heading.

Parameters:
columnHeading - column heading
Returns:
data. null if not found.

getRow

public java.lang.Object[] getRow(int rowIndex)
Get the row for the given row index.

Parameters:
rowIndex - row index
Returns:
data. null if not found.

getColumn

public java.lang.Object[] getColumn(int columnIndex)
Get the column for the given column index.

Parameters:
columnIndex - column index
Returns:
data. null if not found.

get

public java.lang.Object get(int column,
                            int row)
Get the data associated with the specified indices. Indices start with zero.

Parameters:
column - column index
row - row index
Returns:
data.

numColumns

public int numColumns()
Returns number of columns in this table.

Returns:
number of columns

numRows

public int numRows()
Returns number of rows in this table.

Returns:
number of rows

getColumnHeading

public java.lang.Object getColumnHeading(int index)
Get the column heading at specified index.

Parameters:
index - column index
Returns:
column heading
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= numColumns()).

getColumnHeadings

public java.lang.Object[] getColumnHeadings()
Get column headings for this table.

Returns:
column headings

getRowHeading

public java.lang.Object getRowHeading(int index)
Get row heading at specified index.

Parameters:
index - row index
Returns:
row heading
Throws:
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= numRows()).

getRowHeadings

public java.lang.Object[] getRowHeadings()
Get row headings for this table.

Returns:
row headings