public class XYZSeriesCollection<S extends java.lang.Comparable<S>> extends AbstractDataset3D implements XYZDataset<S>, Series3DChangeListener, java.io.Serializable
XYZSeries objects (implements the XYZDataset
interface so that it can be used as a source of data for an
XYZRenderer on an XYZPlot).
| Constructor and Description |
|---|
XYZSeriesCollection()
Creates a new (empty)
XYZSeriesCollection instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(XYZSeries<S> series)
Adds a series to the collection (note that the series key must be
unique within the collection).
|
boolean |
equals(java.lang.Object obj)
Tests this dataset for equality with an arbitrary object.
|
int |
getItemCount(int seriesIndex)
Returns the number of items in the specified series.
|
XYZSeries |
getSeries(java.lang.Comparable<?> key)
Returns the series with the specified key, or
null if
there is no such series. |
XYZSeries<S> |
getSeries(int index)
Returns the series with the specified index.
|
int |
getSeriesCount()
Returns the number of series in the collection.
|
int |
getSeriesIndex(S key)
Returns the index of the series with the specified key, or
-1 if there is no series with the specified key. |
S |
getSeriesKey(int seriesIndex)
Returns the key for the specified series.
|
java.util.List<S> |
getSeriesKeys()
Returns a new list containing all the series keys.
|
double |
getX(int seriesIndex,
int itemIndex)
Returns the x-value for one item in a series.
|
double |
getY(int seriesIndex,
int itemIndex)
Returns the y-value for one item in a series.
|
double |
getZ(int seriesIndex,
int itemIndex)
Returns the z-value for one item in a series.
|
int |
hashCode() |
void |
remove(int seriesIndex)
Removes a series from the collection and sends a
Dataset3DChangeEvent to all registered listeners. |
void |
remove(XYZSeries series)
Removes a series from the collection and sends a
Dataset3DChangeEvent to all registered listeners. |
void |
removeAll()
Removes all the series from the collection and sends a
Dataset3DChangeEvent to all registered listeners. |
void |
seriesChanged(Series3DChangeEvent event)
Called when an observed series changes in some way.
|
java.lang.String |
toString()
Returns a string representation of this instance, primarily for
debugging purposes.
|
addChangeListener, fireChangeEvent, fireDatasetChanged, hasListener, isNotify, notifyListeners, removeChangeListener, setNotifyclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, hasListener, removeChangeListenerpublic XYZSeriesCollection()
XYZSeriesCollection instance.public int getSeriesCount()
getSeriesCount in interface XYZDataset<S extends java.lang.Comparable<S>>public int getSeriesIndex(S key)
-1 if there is no series with the specified key.getSeriesIndex in interface XYZDataset<S extends java.lang.Comparable<S>>key - the key (null not permitted).-1.public java.util.List<S> getSeriesKeys()
XYZSeriesCollection instance.getSeriesKeys in interface XYZDataset<S extends java.lang.Comparable<S>>null).public S getSeriesKey(int seriesIndex)
getSeriesKey in interface XYZDataset<S extends java.lang.Comparable<S>>seriesIndex - the series index.public void add(XYZSeries<S> series)
Dataset3DChangeEvent whenever the data in the series changes.series - the series (null not permitted).public void remove(int seriesIndex)
Dataset3DChangeEvent to all registered listeners.seriesIndex - the series index.public void remove(XYZSeries series)
Dataset3DChangeEvent to all registered listeners. If the series
is not part of the collection, this method does nothing.series - the series (null not permitted).public void removeAll()
Dataset3DChangeEvent to all registered listeners. If the
collection is already empty, this method does nothing.public XYZSeries<S> getSeries(int index)
index - the series index.public XYZSeries getSeries(java.lang.Comparable<?> key)
null if
there is no such series.key - the key (null not permitted).public int getItemCount(int seriesIndex)
getItemCount in interface XYZDataset<S extends java.lang.Comparable<S>>seriesIndex - the series index.public double getX(int seriesIndex, int itemIndex)
getX in interface XYZDataset<S extends java.lang.Comparable<S>>seriesIndex - the series index.itemIndex - the item index.public double getY(int seriesIndex, int itemIndex)
getY in interface XYZDataset<S extends java.lang.Comparable<S>>seriesIndex - the series index.itemIndex - the item index.public double getZ(int seriesIndex, int itemIndex)
getZ in interface XYZDataset<S extends java.lang.Comparable<S>>seriesIndex - the series index.itemIndex - the item index.public void seriesChanged(Series3DChangeEvent event)
seriesChanged in interface Series3DChangeListenerevent - information about the change.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null not permitted).public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
JSONUtils.writeXYZDataset(com.orsoncharts.data.xyz.XYZDataset).toString in class java.lang.Object