/**
* Returns the row keys.
*
* @return The row keys (never <code>null</code>).
*
* @see #getRowKeys()
*/
/**
* Returns the row keys in an unmodifiable list.
*
* @return The row keys.
*
* @see #getColumnKeys()
*/
public List getRowKeys() {
return Collections.unmodifiableList(this.rowKeys);
}
/**
* Returns the key for a given column.
*
* @param column the column.
*
* @return The key.
*
* @see #getColumnIndex(Comparable)
*/
/**
* Returns the key for a given column.
*
* @param column the column (in the range 0 to {@link #getColumnCount()}
* - 1).
*
* @return The key.
*
* @see #getColumnIndex(Comparable)
* @see #getRowKey(int)
*/
public Comparable getColumnKey(int column) {
return (Comparable) this.columnKeys.get(column);
}
/**
* Returns the column index for a given key, or <code>-1</code> if the key
* is not recognised.
*
* @param key the key (<code>null</code> not permitted).
*
* @return The column index.
*
* @see #getColumnKey(int)
*/
/**
* Returns the column index for a given key.
*
* @param key the key (<code>null</code> not permitted).
*
* @return The column index.
*
* @see #getColumnKey(int)
* @see #getRowIndex(Comparable)
*/
public int getColumnIndex(Comparable key) {
if (key == null) {
throw new IllegalArgumentException("Null \'key\' argument.");
}
return this.columnKeys.indexOf(key);
}
/**
* Returns the column keys.
*
* @return The column keys (never <code>null</code>).
*
* @see #getRowKeys()
*/
/**
* Returns the column keys in an unmodifiable list.
*
* @return The column keys.
*
* @see #getRowKeys()
*/
public List getColumnKeys() {
return Collections.unmodifiableList(this.columnKeys);
}
|