org.jfree.data.general
public class DefaultKeyedValueDataset extends AbstractDataset implements KeyedValueDataset, Serializable
Constructor Summary | |
---|---|
DefaultKeyedValueDataset()
Constructs a new dataset, initially empty. | |
DefaultKeyedValueDataset(Comparable key, Number value)
Creates a new dataset with the specified initial value.
| |
DefaultKeyedValueDataset(KeyedValue data)
Creates a new dataset that uses the data from a KeyedValue
instance.
|
Method Summary | |
---|---|
Object | clone()
Creates a clone of the dataset.
|
boolean | equals(Object obj)
Tests this dataset for equality with an arbitrary object.
|
Comparable | getKey()
Returns the key associated with the value, or null if the
dataset has no data item.
|
Number | getValue()
Returns the value.
|
int | hashCode()
Returns a hash code.
|
void | setValue(Comparable key, Number value)
Sets the value for the dataset and sends a DatasetChangeEvent to
all registered listeners.
|
void | updateValue(Number value)
Updates the value.
|
Parameters: key the key. value the value (null
permitted).
Parameters: data the data (null
permitted).
Returns: A clone.
Throws: CloneNotSupportedException This class will not throw this exception, but subclasses (if any) might.
Parameters: obj the object (null
permitted).
Returns: A boolean.
null
if the
dataset has no data item.
Returns: The key.
Returns: The value (possibly null
).
Returns: A hash code.
Parameters: key the key. value the value (null
permitted).
Parameters: value the new value (null
permitted).