public class DefaultXYZDataset extends AbstractXYZDataset implements XYZDataset, org.jfree.util.PublicCloneable
XYZDataset
interface that stores
data values in arrays of double primitives.Constructor and Description |
---|
DefaultXYZDataset()
Creates a new
DefaultXYZDataset instance, initially
containing no data. |
Modifier and Type | Method and Description |
---|---|
void |
addSeries(java.lang.Comparable seriesKey,
double[][] data)
Adds a series or if a series with the same key already exists replaces
the data for that series, then sends a
DatasetChangeEvent to
all registered listeners. |
java.lang.Object |
clone()
Creates an independent copy of this dataset.
|
boolean |
equals(java.lang.Object obj)
Tests this
DefaultXYDataset instance for equality with an
arbitrary object. |
DomainOrder |
getDomainOrder()
Returns the order of the domain (x-) values in the dataset.
|
int |
getItemCount(int series)
Returns the number of items in the specified series.
|
int |
getSeriesCount()
Returns the number of series in the dataset.
|
java.lang.Comparable |
getSeriesKey(int series)
Returns the key for a series.
|
java.lang.Number |
getX(int series,
int item)
Returns the x-value for an item within a series.
|
double |
getXValue(int series,
int item)
Returns the x-value for an item within a series.
|
java.lang.Number |
getY(int series,
int item)
Returns the y-value for an item within a series.
|
double |
getYValue(int series,
int item)
Returns the y-value for an item within a series.
|
java.lang.Number |
getZ(int series,
int item)
Returns the z-value for an item within a series.
|
double |
getZValue(int series,
int item)
Returns the z-value for an item within a series.
|
int |
hashCode()
Returns a hash code for this instance.
|
int |
indexOf(java.lang.Comparable seriesKey)
Returns the index of the series with the specified key, or -1 if there
is no such series in the dataset.
|
void |
removeSeries(java.lang.Comparable seriesKey)
Removes a series from the dataset, then sends a
DatasetChangeEvent to all registered listeners. |
seriesChanged
addChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObject
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addChangeListener, getGroup, removeChangeListener, setGroup
public DefaultXYZDataset()
DefaultXYZDataset
instance, initially
containing no data.public int getSeriesCount()
getSeriesCount
in interface SeriesDataset
getSeriesCount
in class AbstractSeriesDataset
public java.lang.Comparable getSeriesKey(int series)
getSeriesKey
in interface SeriesDataset
getSeriesKey
in class AbstractSeriesDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).java.lang.IllegalArgumentException
- if series
is not in the
specified range.public int indexOf(java.lang.Comparable seriesKey)
indexOf
in interface SeriesDataset
indexOf
in class AbstractSeriesDataset
seriesKey
- the series key (null
permitted).public DomainOrder getDomainOrder()
DomainOrder.NONE
.getDomainOrder
in interface XYDataset
getDomainOrder
in class AbstractXYDataset
DomainOrder.NONE
.public int getItemCount(int series)
getItemCount
in interface XYDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).java.lang.IllegalArgumentException
- if series
is not in the
specified range.public double getXValue(int series, int item)
getXValue
in interface XYDataset
getXValue
in class AbstractXYDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).item
- the item index (in the range 0
to
getItemCount(series)
).java.lang.ArrayIndexOutOfBoundsException
- if series
is not
within the specified range.java.lang.ArrayIndexOutOfBoundsException
- if item
is not
within the specified range.getX(int, int)
public java.lang.Number getX(int series, int item)
getX
in interface XYDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).item
- the item index (in the range 0
to
getItemCount(series)
).java.lang.ArrayIndexOutOfBoundsException
- if series
is not
within the specified range.java.lang.ArrayIndexOutOfBoundsException
- if item
is not
within the specified range.getXValue(int, int)
public double getYValue(int series, int item)
getYValue
in interface XYDataset
getYValue
in class AbstractXYDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).item
- the item index (in the range 0
to
getItemCount(series)
).java.lang.ArrayIndexOutOfBoundsException
- if series
is not
within the specified range.java.lang.ArrayIndexOutOfBoundsException
- if item
is not
within the specified range.getY(int, int)
public java.lang.Number getY(int series, int item)
getY
in interface XYDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).item
- the item index (in the range 0
to
getItemCount(series)
).java.lang.ArrayIndexOutOfBoundsException
- if series
is not
within the specified range.java.lang.ArrayIndexOutOfBoundsException
- if item
is not
within the specified range.getX(int, int)
public double getZValue(int series, int item)
getZValue
in interface XYZDataset
getZValue
in class AbstractXYZDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).item
- the item index (in the range 0
to
getItemCount(series)
).java.lang.ArrayIndexOutOfBoundsException
- if series
is not
within the specified range.java.lang.ArrayIndexOutOfBoundsException
- if item
is not
within the specified range.getZ(int, int)
public java.lang.Number getZ(int series, int item)
getZ
in interface XYZDataset
series
- the series index (in the range 0
to
getSeriesCount() - 1
).item
- the item index (in the range 0
to
getItemCount(series)
).java.lang.ArrayIndexOutOfBoundsException
- if series
is not
within the specified range.java.lang.ArrayIndexOutOfBoundsException
- if item
is not
within the specified range.getZ(int, int)
public void addSeries(java.lang.Comparable seriesKey, double[][] data)
DatasetChangeEvent
to
all registered listeners.seriesKey
- the series key (null
not permitted).data
- the data (must be an array with length 3, containing three
arrays of equal length, the first containing the x-values, the
second containing the y-values and the third containing the
z-values).public void removeSeries(java.lang.Comparable seriesKey)
DatasetChangeEvent
to all registered listeners.seriesKey
- the series key (null
not permitted).public boolean equals(java.lang.Object obj)
DefaultXYDataset
instance for equality with an
arbitrary object. This method returns true
if and only if:
obj
is not null
;obj
is an instance of
DefaultXYDataset
;equals
in class java.lang.Object
obj
- the object (null
permitted).public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class AbstractDataset
java.lang.CloneNotSupportedException
- if there is a problem cloning the
dataset (for instance, if a non-cloneable object is used for a
series key).