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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor serialization.private NumberThe value. -
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 AbstractDataset
addChangeListener, canEqual, clone, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectMethods inherited from class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Dataset
addChangeListener, getGroup, removeChangeListener, setGroupMethods inherited from interface PublicCloneable
clone
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
value
The value.
-
-
Constructor Details
-
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
Creates a new dataset with the specified value.- Parameters:
value- the initial value (nullpermitted).
-
-
Method Details
-
getValue
-
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
public int hashCode()Returns a hash code.- Overrides:
hashCodein classAbstractDataset- Returns:
- A hash code.
-