public class

DefaultValueDataset

extends AbstractDataset
implements Serializable Cloneable ValueDataset
java.lang.Object
   ↳ org.jfree.data.general.AbstractDataset
     ↳ org.jfree.data.general.DefaultValueDataset

Class Overview

A dataset that stores a single value (that is possibly null). This class provides a default implementation of the ValueDataset interface.

Summary

Public Constructors
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.
Public Methods
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.
[Expand]
Inherited Methods
From class org.jfree.data.general.AbstractDataset
From class java.lang.Object
From interface java.io.ObjectInputValidation
From interface org.jfree.data.Value
From interface org.jfree.data.general.Dataset

Public Constructors

public DefaultValueDataset ()

Constructs a new dataset, initially empty.

public DefaultValueDataset (double value)

Creates a new dataset with the specified value.

Parameters
value the value.

public DefaultValueDataset (Number value)

Creates a new dataset with the specified value.

Parameters
value the initial value (null permitted).

Public Methods

public boolean equals (Object obj)

Tests this dataset for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public Number getValue ()

Returns the value.

Returns
  • The value (possibly null).

public int hashCode ()

Returns a hash code.

Returns
  • A hash code.

public void setValue (Number value)

Sets the value and sends a DatasetChangeEvent to all registered listeners.

Parameters
value the new value (null permitted).