- java.lang.Object
-
- org.jfree.data.general.AbstractDataset
-
- org.jfree.data.general.DefaultValueDataset
-
- All Implemented Interfaces:
ObjectInputValidation,Serializable,Cloneable,PublicCloneable,Dataset,ValueDataset,Value
public class DefaultValueDataset extends AbstractDataset implements ValueDataset, Cloneable, PublicCloneable, Serializable
A dataset that stores a single value (that is possiblynull). This class provides a default implementation of theValueDatasetinterface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultValueDataset()Constructs a new dataset, initially empty.DefaultValueDataset(double value)Creates a new dataset with the specified value.DefaultValueDataset(Number value)Creates a new dataset with the specified value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Tests this dataset for equality with an arbitrary object.NumbergetValue()Returns the value.inthashCode()Returns a hash code.voidsetValue(Number value)Sets the value and sends aDatasetChangeEventto all registered listeners.-
Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, clone, fireDatasetChanged, getNotify, hasListener, notifyListeners, removeChangeListener, setNotify, 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, removeChangeListener
-
Methods inherited from interface org.jfree.chart.api.PublicCloneable
clone
-
-
-
-
Constructor Detail
-
DefaultValueDataset
public DefaultValueDataset()
Constructs a new dataset, initially empty.
-
DefaultValueDataset
public DefaultValueDataset(double value)
Creates a new dataset with the specified value.- Parameters:
value- the value.
-
DefaultValueDataset
public DefaultValueDataset(Number value)
Creates a new dataset with the specified value.- Parameters:
value- the initial value (nullpermitted).
-
-
Method Detail
-
setValue
public void setValue(Number value)
Sets the value and sends aDatasetChangeEventto all registered listeners.- Parameters:
value- the new value (nullpermitted).
-
-