public class

DefaultKeyedValueDataset

extends AbstractDataset
implements Serializable KeyedValueDataset
java.lang.Object
   ↳ org.jfree.data.general.AbstractDataset
     ↳ org.jfree.data.general.DefaultKeyedValueDataset

Class Overview

A default implementation of the KeyedValueDataset interface.

Summary

Public Constructors
DefaultKeyedValueDataset()
Constructs a new dataset, initially empty.
DefaultKeyedValueDataset(Comparable key, Number value)
Creates a new dataset with the specified initial value.
DefaultKeyedValueDataset(KeyedValue data)
Creates a new dataset that uses the data from a KeyedValue instance.
Public Methods
Object clone()
Creates a clone of the dataset.
boolean equals(Object obj)
Tests this dataset for equality with an arbitrary object.
Comparable getKey()
Returns the key associated with the value, or null if the dataset has no data item.
Number getValue()
Returns the value.
int hashCode()
Returns a hash code.
void setValue(Comparable key, Number value)
Sets the value for the dataset and sends a DatasetChangeEvent to all registered listeners.
void updateValue(Number value)
Updates the value.
[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.KeyedValue
From interface org.jfree.data.Value
From interface org.jfree.data.general.Dataset

Public Constructors

public DefaultKeyedValueDataset ()

Constructs a new dataset, initially empty.

public DefaultKeyedValueDataset (Comparable key, Number value)

Creates a new dataset with the specified initial value.

Parameters
key the key.
value the value (null permitted).

public DefaultKeyedValueDataset (KeyedValue data)

Creates a new dataset that uses the data from a KeyedValue instance.

Parameters
data the data (null permitted).

Public Methods

public Object clone ()

Creates a clone of the dataset.

Returns
  • A clone.
Throws
CloneNotSupportedException This class will not throw this exception, but subclasses (if any) might.

public boolean equals (Object obj)

Tests this dataset for equality with an arbitrary object.

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

public Comparable getKey ()

Returns the key associated with the value, or null if the dataset has no data item.

Returns
  • The key.

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 (Comparable key, Number value)

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

Parameters
key the key.
value the value (null permitted).

public void updateValue (Number value)

Updates the value.

Parameters
value the new value (null permitted).