|
JFreeChart 1.0.14-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.data.general.AbstractDataset
org.jfree.data.general.DefaultKeyedValueDataset
public class DefaultKeyedValueDataset
A default implementation of the KeyedValueDataset
interface.
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. |
Methods inherited from class org.jfree.data.general.AbstractDataset |
---|
addChangeListener, fireDatasetChanged, getGroup, hasListener, notifyListeners, removeChangeListener, setGroup, validateObject |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.data.general.Dataset |
---|
addChangeListener, getGroup, removeChangeListener, setGroup |
Constructor Detail |
---|
public DefaultKeyedValueDataset()
public DefaultKeyedValueDataset(Comparable key, Number value)
key
- the key.value
- the value (null
permitted).public DefaultKeyedValueDataset(KeyedValue data)
KeyedValue
instance.
data
- the data (null
permitted).Method Detail |
---|
public Comparable getKey()
null
if the
dataset has no data item.
getKey
in interface KeyedValue
public Number getValue()
getValue
in interface Value
null
).public void updateValue(Number value)
value
- the new value (null
permitted).public void setValue(Comparable key, Number value)
DatasetChangeEvent
to
all registered listeners.
key
- the key.value
- the value (null
permitted).public boolean equals(Object obj)
equals
in class Object
obj
- the object (null
permitted).
public int hashCode()
hashCode
in class Object
public Object clone() throws CloneNotSupportedException
clone
in class AbstractDataset
CloneNotSupportedException
- This class will not throw this
exception, but subclasses (if any) might.
|
JFreeChart 1.0.14-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |