com.jrefinery.data
Class DefaultValueDataset

java.lang.Object
  extended by com.jrefinery.data.AbstractDataset
      extended by com.jrefinery.data.DefaultValueDataset
All Implemented Interfaces:
Dataset, Value, ValueDataset, java.io.Serializable, java.lang.Cloneable

public class DefaultValueDataset
extends AbstractDataset
implements ValueDataset, java.lang.Cloneable, java.io.Serializable

A default implementation of the ValueDataset interface.

Author:
David Gilbert
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jrefinery.data.AbstractDataset
listeners
 
Constructor Summary
DefaultValueDataset()
          Constructs a new dataset, initially empty.
DefaultValueDataset(double value)
          Creates a new dataset.
DefaultValueDataset(java.lang.Number value)
          Creates a new dataset.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Tests this dataset for equality with an arbitrary object.
 java.lang.Number getValue()
          Returns the value.
 void setValue(java.lang.Number value)
          Sets the value.
 
Methods inherited from class com.jrefinery.data.AbstractDataset
addChangeListener, fireDatasetChanged, notifyListeners, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jrefinery.data.Dataset
addChangeListener, removeChangeListener
 

Constructor Detail

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(java.lang.Number value)
Creates a new dataset.

Parameters:
value - the initial value.
Method Detail

getValue

public java.lang.Number getValue()
Returns the value.

Specified by:
getValue in interface Value
Returns:
the value.

setValue

public void setValue(java.lang.Number value)
Sets the value. A DatasetChangeEvent is sent to all registered listeners.

Parameters:
value - the new value.

equals

public boolean equals(java.lang.Object obj)
Tests this dataset for equality with an arbitrary object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object.
Returns:
A boolean.


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.