edu.northwestern.at.utils.swing
Interface SortedTableModel.Row

All Known Implementing Classes:
CollocateContextRow, FrequencyAnalysisDataRow, SortedTableModelRow
Enclosing class:
SortedTableModel

public static interface SortedTableModel.Row

Row interface for sorted tables.

All row objects in a sorted table must implement this interface.


Method Summary
 int compareTo(SortedTableModel.Row other, int columnIndex)
          Compares this row to another row using a specified column.
 java.lang.Object getUniqueRowID()
          Get unique identifier for each row.
 java.lang.Object getValue(int columnIndex)
          Gets the value of a column.
 

Method Detail

getValue

java.lang.Object getValue(int columnIndex)
Gets the value of a column.

Parameters:
columnIndex - Column index.
Returns:
Column value.

compareTo

int compareTo(SortedTableModel.Row other,
              int columnIndex)
Compares this row to another row using a specified column.

Parameters:
other - The other row.
columnIndex - Column index.
Returns:
< 0 if this row < other row, 0 if this row = other row, > 0 if this row > other row.

getUniqueRowID

java.lang.Object getUniqueRowID()
Get unique identifier for each row.

Returns:
The unique identifier.

The unique identifier is used as a secondary key when sorting table rows. The object used for the unique identifier must implement the toString() method.