| org.jfree.data.xy.AbstractXYDataset org.jfree.data.xy.DefaultXYDataset
DefaultXYDataset | public class DefaultXYDataset extends AbstractXYDataset implements XYDataset,PublicCloneable(Code) | | A default implementation of the
XYDataset interface that stores
data values in arrays of double primitives.
since: 1.0.2 |
Constructor Summary | |
public | DefaultXYDataset() Creates a new DefaultXYDataset instance, initially
containing no data. |
Method Summary | |
public void | addSeries(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.
Parameters: seriesKey - the series key (null not permitted). Parameters: data - the data (must be an array with length 2, containing two arrays of equal length, the first containing the x-values and thesecond containing the y-values). | public Object | clone() Creates an independent copy of this dataset. | public boolean | equals(Object obj) Tests this DefaultXYDataset instance for equality with an
arbitrary object. | public DomainOrder | getDomainOrder() Returns the order of the domain (x-) values in the dataset. | public int | getItemCount(int series) Returns the number of items in the specified series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). | public int | getSeriesCount() Returns the number of series in the dataset. | public Comparable | getSeriesKey(int series) Returns the key for a series. | public Number | getX(int series, int item) Returns the x-value for an item within a series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). Parameters: item - the item index (in the range 0 to getItemCount(series) ). | public double | getXValue(int series, int item) Returns the x-value for an item within a series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). Parameters: item - the item index (in the range 0 to getItemCount(series) ). | public Number | getY(int series, int item) Returns the y-value for an item within a series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). Parameters: item - the item index (in the range 0 to getItemCount(series) ). | public double | getYValue(int series, int item) Returns the y-value for an item within a series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). Parameters: item - the item index (in the range 0 to getItemCount(series) ). | public int | hashCode() Returns a hash code for this instance. | public int | indexOf(Comparable seriesKey) Returns the index of the series with the specified key, or -1 if there
is no such series in the dataset.
Parameters: seriesKey - the series key (null permitted). | public void | removeSeries(Comparable seriesKey) Removes a series from the dataset, then sends a
DatasetChangeEvent to all registered listeners. |
DefaultXYDataset | public DefaultXYDataset()(Code) | | Creates a new DefaultXYDataset instance, initially
containing no data.
|
addSeries | public void addSeries(Comparable seriesKey, double[][] data)(Code) | | 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.
Parameters: seriesKey - the series key (null not permitted). Parameters: data - the data (must be an array with length 2, containing two arrays of equal length, the first containing the x-values and thesecond containing the y-values). |
equals | public boolean equals(Object obj)(Code) | | Tests this 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 ;
- both datasets have the same number of series, each containing
exactly the same values.
Parameters: obj - the object (null permitted). A boolean. |
getDomainOrder | public DomainOrder getDomainOrder()(Code) | | Returns the order of the domain (x-) values in the dataset. In this
implementation, we cannot guarantee that the x-values are ordered, so
this method returns DomainOrder.NONE .
DomainOrder.NONE . |
getItemCount | public int getItemCount(int series)(Code) | | Returns the number of items in the specified series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). The item count. throws: IllegalArgumentException - if series is not in the specified range. |
getSeriesCount | public int getSeriesCount()(Code) | | Returns the number of series in the dataset.
The series count. |
getSeriesKey | public Comparable getSeriesKey(int series)(Code) | | Returns the key for a series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). The key for the series. throws: IllegalArgumentException - if series is not in the specified range. |
getXValue | public double getXValue(int series, int item)(Code) | | Returns the x-value for an item within a series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). Parameters: item - the item index (in the range 0 to getItemCount(series) ). The x-value. throws: ArrayIndexOutOfBoundsException - if series is not within the specified range. throws: ArrayIndexOutOfBoundsException - if item is not within the specified range. See Also: DefaultXYDataset.getX(int,int) |
getYValue | public double getYValue(int series, int item)(Code) | | Returns the y-value for an item within a series.
Parameters: series - the series index (in the range 0 to getSeriesCount() - 1 ). Parameters: item - the item index (in the range 0 to getItemCount(series) ). The y-value. throws: ArrayIndexOutOfBoundsException - if series is not within the specified range. throws: ArrayIndexOutOfBoundsException - if item is not within the specified range. See Also: DefaultXYDataset.getY(int,int) |
hashCode | public int hashCode()(Code) | | Returns a hash code for this instance.
A hash code. |
indexOf | public int indexOf(Comparable seriesKey)(Code) | | Returns the index of the series with the specified key, or -1 if there
is no such series in the dataset.
Parameters: seriesKey - the series key (null permitted). The index, or -1. |
removeSeries | public void removeSeries(Comparable seriesKey)(Code) | | Removes a series from the dataset, then sends a
DatasetChangeEvent to all registered listeners.
Parameters: seriesKey - the series key (null not permitted). |
|
|