org.jfree.data.general
Class DefaultValueDataset
- Cloneable, Dataset, ObjectInputValidation, PublicCloneable, Serializable, Value, ValueDataset
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.
boolean | equals(Object obj) - Tests this dataset for equality with an arbitrary object.
|
Number | getValue() - Returns the value.
|
int | hashCode() - Returns a hash code.
|
void | setValue(Number value) - Sets the value and sends a
DatasetChangeEvent to all registered
listeners.
|
DefaultValueDataset
public DefaultValueDataset(Number value)
Creates a new dataset with the specified value.
value
- the initial value (null
permitted).
DefaultValueDataset
public DefaultValueDataset(double value)
Creates a new dataset with the specified value.
equals
public boolean equals(Object obj)
Tests this dataset for equality with an arbitrary object.
obj
- the object (null
permitted).
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(Number value)
value
- the new value (null
permitted).