org.jfree.data.general
Class DefaultKeyedValueDataset
- Cloneable, Dataset, KeyedValue, KeyedValueDataset, ObjectInputValidation, Serializable, Value
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.
|
DefaultKeyedValueDataset
public DefaultKeyedValueDataset(Comparable key,
Number value)
Creates a new dataset with the specified initial value.
key
- the key.value
- the value (null
permitted).
clone
public Object clone()
throws CloneNotSupportedException
Creates a clone of the dataset.
- clone in interface AbstractDataset
equals
public boolean equals(Object obj)
Tests this dataset for equality with an arbitrary object.
getKey
public Comparable getKey()
Returns the key associated with the value, or null
if the
dataset has no data item.
- getKey in interface KeyedValue
getValue
public Number getValue()
Returns the value.
- getValue in interface Value
- The value (possibly
null
).
hashCode
public int hashCode()
Returns a hash code.
setValue
public void setValue(Comparable key,
Number value)
Sets the value for the dataset and sends a
DatasetChangeEvent
to
all registered listeners.
key
- the key.value
- the value (null
permitted).
updateValue
public void updateValue(Number value)
Updates the value.
value
- the new value (null
permitted).