| java.lang.Object | |
| ↳ | org.jfree.data.DefaultKeyedValues2D |
A data structure that stores zero, one or many values, where each value
is associated with two keys (a 'row' key and a 'column' key). The keys
should be (a) instances of Comparable and (b) immutable.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new instance (initially empty).
| |||||||||||
Creates a new instance (initially empty).
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a value to the table.
| |||||||||||
Clears all the data and associated keys.
| |||||||||||
Returns a clone.
| |||||||||||
Tests if this object is equal to another.
| |||||||||||
Returns the column count.
| |||||||||||
Returns the column index for a given key.
| |||||||||||
Returns the key for a given column.
| |||||||||||
Returns the column keys in an unmodifiable list.
| |||||||||||
Returns the row count.
| |||||||||||
Returns the row index for a given key.
| |||||||||||
Returns the key for a given row.
| |||||||||||
Returns the row keys in an unmodifiable list.
| |||||||||||
Returns the value for the given row and column keys.
| |||||||||||
Returns the value for a given row and column.
| |||||||||||
Returns a hash code.
| |||||||||||
Removes a column from the table.
| |||||||||||
Removes a column.
| |||||||||||
Removes a row.
| |||||||||||
Removes a row from the table.
| |||||||||||
Removes a value from the table by setting it to
null. | |||||||||||
Adds or updates a value.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.jfree.data.KeyedValues2D
| |||||||||||
From interface
org.jfree.data.Values2D
| |||||||||||
Creates a new instance (initially empty).
Creates a new instance (initially empty).
| sortRowKeys | if the row keys should be sorted. |
|---|
Adds a value to the table. Performs the same function as #setValue(Number, Comparable, Comparable).
| value | the value (null permitted). |
|---|---|
| rowKey | the row key (null not permitted). |
| columnKey | the column key (null not permitted). |
Clears all the data and associated keys.
Returns a clone.
| CloneNotSupportedException | this class will not throw this exception, but subclasses (if any) might. |
|---|
Tests if this object is equal to another.
| o | the other object (null permitted). |
|---|
Returns the column index for a given key.
| key | the key (null not permitted). |
|---|
Returns the key for a given column.
| column | the column (in the range 0 to getColumnCount()
- 1). |
|---|
Returns the row index for a given key.
| key | the key (null not permitted). |
|---|
Returns the key for a given row.
| row | the row index (in the range 0 to getRowCount() - 1). |
|---|
Returns the value for the given row and column keys. This method will
throw an UnknownKeyException if either key is not defined in the
data structure.
| rowKey | the row key (null not permitted). |
|---|---|
| columnKey | the column key (null not permitted). |
null).Returns the value for a given row and column.
| row | the row index. |
|---|---|
| column | the column index. |
Returns a hash code.
Removes a column from the table.
| columnKey | the column key (null not permitted). |
|---|
| UnknownKeyException | if the table does not contain a column with the specified key. |
|---|---|
| IllegalArgumentException | if columnKey is
null. |
Removes a column.
| columnIndex | the column index. |
|---|
Removes a row from the table.
| rowKey | the row key (null not permitted). |
|---|
| UnknownKeyException | if rowKey is not defined in the
table.
|
|---|
Removes a value from the table by setting it to null. If
all the values in the specified row and/or column are now
null, the row and/or column is removed from the table.
| rowKey | the row key (null not permitted). |
|---|---|
| columnKey | the column key (null not permitted). |
Adds or updates a value.
| value | the value (null permitted). |
|---|---|
| rowKey | the row key (null not permitted). |
| columnKey | the column key (null not permitted). |