Module org.jfree.chart3d
Package org.jfree.chart3d.data.xyz
Class XYZSeriesCollection<S extends Comparable<S>>
java.lang.Object
org.jfree.chart3d.data.AbstractDataset3D
org.jfree.chart3d.data.xyz.XYZSeriesCollection<S>
- All Implemented Interfaces:
Serializable,EventListener,Dataset3D,Series3DChangeListener,XYZDataset<S>
public class XYZSeriesCollection<S extends Comparable<S>>
extends AbstractDataset3D
implements XYZDataset<S>, Series3DChangeListener, Serializable
A collection of
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
XYZSeries objects (implements the XYZDataset
interface so that it can be used as a source of data for an
XYZRenderer on an XYZPlot).
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a series to the collection (note that the series key must be unique within the collection).booleanTests this dataset for equality with an arbitrary object.intgetItemCount(int seriesIndex) Returns the number of items in the specified series.getSeries(int index) Returns the series with the specified index.getSeries(Comparable<?> key) Returns the series with the specified key, ornullif there is no such series.intReturns the number of series in the collection.intgetSeriesIndex(S key) Returns the index of the series with the specified key, or-1if there is no series with the specified key.getSeriesKey(int seriesIndex) Returns the key for the specified series.Returns a new list containing all the series keys.doublegetX(int seriesIndex, int itemIndex) Returns the x-value for one item in a series.doublegetY(int seriesIndex, int itemIndex) Returns the y-value for one item in a series.doublegetZ(int seriesIndex, int itemIndex) Returns the z-value for one item in a series.inthashCode()voidremove(int seriesIndex) Removes a series from the collection and sends aDataset3DChangeEventto all registered listeners.voidRemoves a series from the collection and sends aDataset3DChangeEventto all registered listeners.voidRemoves all the series from the collection and sends aDataset3DChangeEventto all registered listeners.voidseriesChanged(Series3DChangeEvent event) Called when an observed series changes in some way.toString()Returns a string representation of this instance, primarily for debugging purposes.Methods inherited from class org.jfree.chart3d.data.AbstractDataset3D
addChangeListener, fireChangeEvent, fireDatasetChanged, hasListener, isNotify, notifyListeners, removeChangeListener, setNotifyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jfree.chart3d.data.Dataset3D
addChangeListener, hasListener, removeChangeListener
-
Constructor Details
-
XYZSeriesCollection
public XYZSeriesCollection()Creates a new (empty)XYZSeriesCollectioninstance.
-
-
Method Details
-
getSeriesCount
Returns the number of series in the collection.- Specified by:
getSeriesCountin interfaceXYZDataset<S extends Comparable<S>>- Returns:
- The number of series in the collection.
-
getSeriesIndex
Returns the index of the series with the specified key, or-1if there is no series with the specified key.- Specified by:
getSeriesIndexin interfaceXYZDataset<S extends Comparable<S>>- Parameters:
key- the key (nullnot permitted).- Returns:
- The series index or
-1.
-
getSeriesKeys
Returns a new list containing all the series keys. Modifying this list will have no impact on theXYZSeriesCollectioninstance.- Specified by:
getSeriesKeysin interfaceXYZDataset<S extends Comparable<S>>- Returns:
- A list containing the series keys (possibly empty, but never
null).
-
getSeriesKey
Returns the key for the specified series.- Specified by:
getSeriesKeyin interfaceXYZDataset<S extends Comparable<S>>- Parameters:
seriesIndex- the series index.- Returns:
- The series key.
- Since:
- 1.3
-
add
Adds a series to the collection (note that the series key must be unique within the collection). The collection will automatically register to receive change events from the series, and fire aDataset3DChangeEventwhenever the data in the series changes.- Parameters:
series- the series (nullnot permitted).
-
remove
Removes a series from the collection and sends aDataset3DChangeEventto all registered listeners.- Parameters:
seriesIndex- the series index.- Since:
- 1.6
-
remove
Removes a series from the collection and sends aDataset3DChangeEventto all registered listeners. If the series is not part of the collection, this method does nothing.- Parameters:
series- the series (nullnot permitted).- Since:
- 1.6
-
removeAll
Removes all the series from the collection and sends aDataset3DChangeEventto all registered listeners. If the collection is already empty, this method does nothing. -
getSeries
Returns the series with the specified index.- Parameters:
index- the series index.- Returns:
- The series.
- Since:
- 1.2
-
getSeries
Returns the series with the specified key, ornullif there is no such series.- Parameters:
key- the key (nullnot permitted).- Returns:
- The series.
- Since:
- 1.2
-
getItemCount
Returns the number of items in the specified series.- Specified by:
getItemCountin interfaceXYZDataset<S extends Comparable<S>>- Parameters:
seriesIndex- the series index.- Returns:
- The number of items in the specified series.
-
getX
Returns the x-value for one item in a series.- Specified by:
getXin interfaceXYZDataset<S extends Comparable<S>>- Parameters:
seriesIndex- the series index.itemIndex- the item index.- Returns:
- The x-value.
-
getY
Returns the y-value for one item in a series.- Specified by:
getYin interfaceXYZDataset<S extends Comparable<S>>- Parameters:
seriesIndex- the series index.itemIndex- the item index.- Returns:
- The y-value.
-
getZ
Returns the z-value for one item in a series.- Specified by:
getZin interfaceXYZDataset<S extends Comparable<S>>- Parameters:
seriesIndex- the series index.itemIndex- the item index.- Returns:
- The z-value.
-
seriesChanged
Called when an observed series changes in some way.- Specified by:
seriesChangedin interfaceSeries3DChangeListener- Parameters:
event- information about the change.- Since:
- 1.6
-
equals
Tests this dataset for equality with an arbitrary object. -
hashCode
-
toString
Returns a string representation of this instance, primarily for debugging purposes.
Implementation note: the current implementation (which is subject to change) writes the dataset in JSON format usingJSONUtils.writeXYZDataset(org.jfree.chart3d.data.xyz.XYZDataset).
-