Package org.jfree.data.general
Class DefaultValueDataset
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 possibly
null).
This class provides a default implementation of the ValueDataset
interface.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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
Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, canEqual, clone, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroupMethods inherited from interface org.jfree.chart.util.PublicCloneable
clone
-
Constructor Details
-
DefaultValueDataset
public DefaultValueDataset()Constructs a new dataset, initially empty. -
DefaultValueDataset
Creates a new dataset with the specified value.- Parameters:
value- the value.
-
DefaultValueDataset
Creates a new dataset with the specified value.- Parameters:
value- the initial value (nullpermitted).
-
-
Method Details
-
getValue
Returns the value. -
setValue
Sets the value and sends aDatasetChangeEventto all registered listeners.- Parameters:
value- the new value (nullpermitted).
-
equals
Tests this dataset for equality with an arbitrary object.- Overrides:
equalsin classAbstractDataset- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
hashCode
Returns a hash code.- Overrides:
hashCodein classAbstractDataset- Returns:
- A hash code.
-