Class DefaultValueDataset

java.lang.Object
org.jfree.data.AbstractDataset
org.jfree.data.DefaultValueDataset
All Implemented Interfaces:
ObjectInputValidation, Serializable, Cloneable, Dataset, Value, ValueDataset

public class DefaultValueDataset
extends AbstractDataset
implements ValueDataset, Cloneable, Serializable
A default implementation of the ValueDataset interface.
See Also:
Serialized Form
  • Constructor Details

    • DefaultValueDataset

      public DefaultValueDataset()
      Constructs a new dataset, initially empty.
    • DefaultValueDataset

      public DefaultValueDataset​(double value)
      Creates a new dataset.
      Parameters:
      value - the value.
    • DefaultValueDataset

      public DefaultValueDataset​(Number value)
      Creates a new dataset.
      Parameters:
      value - the initial value.
  • Method Details

    • getValue

      public Number getValue()
      Returns the value.
      Specified by:
      getValue in interface Value
      Returns:
      the value.
    • setValue

      public void setValue​(Number value)
      Sets the value. A DatasetChangeEvent is sent to all registered listeners.
      Parameters:
      value - the new value.
    • equals

      public boolean equals​(Object obj)
      Tests this dataset for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object.
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Returns a hash code.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code.