org.jfree.data
public class KeyedObjects2D extends Object implements Cloneable, Serializable
| Constructor Summary | |
|---|---|
| KeyedObjects2D()
Creates a new instance (initially empty). | |
| Method Summary | |
|---|---|
| void | addObject(Object object, Comparable rowKey, Comparable columnKey)
Adds an object to the table. |
| void | clear()
Clears all the data and associated keys.
|
| Object | clone()
Returns a clone.
|
| boolean | equals(Object obj)
Tests this object for equality with an arbitrary object.
|
| int | getColumnCount()
Returns the column count.
|
| int | getColumnIndex(Comparable key)
Returns the column index for a given key, or -1 if the key
is not recognised.
|
| Comparable | getColumnKey(int column)
Returns the key for a given column.
|
| List | getColumnKeys()
Returns the column keys.
|
| Object | getObject(int row, int column)
Returns the object for a given row and column.
|
| Object | getObject(Comparable rowKey, Comparable columnKey)
Returns the object for the given row and column keys.
|
| int | getRowCount()
Returns the row count.
|
| int | getRowIndex(Comparable key)
Returns the row index for a given key, or -1 if the key
is not recognised.
|
| Comparable | getRowKey(int row)
Returns the key for a given row.
|
| List | getRowKeys()
Returns the row keys.
|
| int | hashCode()
Returns a hashcode for this object.
|
| void | removeColumn(int columnIndex)
Removes an entire column from the table.
|
| void | removeColumn(Comparable columnKey)
Removes an entire column from the table.
|
| void | removeObject(Comparable rowKey, Comparable columnKey)
Removes an object from the table by setting it to null. |
| void | removeRow(int rowIndex)
Removes an entire row from the table.
|
| void | removeRow(Comparable rowKey)
Removes an entire row from the table.
|
| void | setObject(Object object, Comparable rowKey, Comparable columnKey)
Adds or updates an object.
|
Parameters: object the object. rowKey the row key (null not permitted). columnKey the column key (null not permitted).
Since: 1.0.7
Returns: A clone.
Throws: CloneNotSupportedException this class will not throw this exception, but subclasses (if any) might.
Parameters: obj the object to test (null permitted).
Returns: A boolean.
Returns: The column count.
See Also: getRowCount
-1 if the key
is not recognised.
Parameters: key the key (null not permitted).
Returns: The column index.
See Also: KeyedObjects2D
Parameters: column the column.
Returns: The key.
See Also: getColumnIndex
Returns: The column keys (never null).
See Also: getRowKeys
Parameters: row the row index (in the range 0 to getRowCount() - 1). column the column index (in the range 0 to getColumnCount() - 1).
Returns: The object (possibly null).
See Also: KeyedObjects2D
Parameters: rowKey the row key (null not permitted). columnKey the column key (null not permitted).
Returns: The object (possibly null).
Throws: IllegalArgumentException if rowKey UnknownKeyException if or
columnKey is null.rowKey or
columnKey is not recognised.
Returns: The row count.
See Also: getColumnCount
-1 if the key
is not recognised.
Parameters: key the key (null not permitted).
Returns: The row index.
See Also: KeyedObjects2D
Parameters: row the row index (zero based).
Returns: The row index.
See Also: getRowIndex
Returns: The row keys (never null).
See Also: getRowKeys
Returns: A hashcode.
Parameters: columnIndex the column index.
See Also: KeyedObjects2D
Parameters: columnKey the column key (null not permitted).
Throws: UnknownKeyException if rowKey is not recognised.
See Also: removeRow
null. If
all the objects in the specified row and/or column are now
null, the row and/or column is removed from the table.
Parameters: rowKey the row key (null not permitted). columnKey the column key (null not permitted).
See Also: KeyedObjects2D
Parameters: rowIndex the row index.
See Also: KeyedObjects2D
Parameters: rowKey the row key (null not permitted).
Throws: UnknownKeyException if rowKey is not recognised.
See Also: removeColumn
Parameters: object the object. rowKey the row key (null not permitted). columnKey the column key (null not permitted).