objects.
| Method from org.jfree.data.xy.XIntervalSeriesCollection Detail: |
public void addSeries(XIntervalSeries series) {
if (series == null) {
throw new IllegalArgumentException("Null 'series' argument.");
}
this.data.add(series);
series.addChangeListener(this);
fireDatasetChanged();
}
Adds a series to the collection and sends a DatasetChangeEvent
to all registered listeners. |
public Object clone() throws CloneNotSupportedException {
XIntervalSeriesCollection clone
= (XIntervalSeriesCollection) super.clone();
clone.data = (List) ObjectUtilities.deepClone(this.data);
return clone;
}
Returns a clone of this instance. |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof XIntervalSeriesCollection)) {
return false;
}
XIntervalSeriesCollection that = (XIntervalSeriesCollection) obj;
return ObjectUtilities.equal(this.data, that.data);
}
Tests this instance for equality with an arbitrary object. |
public Number getEndX(int series,
int item) {
XIntervalSeries s = (XIntervalSeries) this.data.get(series);
XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
return new Double(di.getXHighValue());
}
Returns the end x-value for an item within a series. |
public double getEndXValue(int series,
int item) {
XIntervalSeries s = (XIntervalSeries) this.data.get(series);
return s.getXHighValue(item);
}
Returns the end x-value (as a double primitive) for an item within a
series. |
public Number getEndY(int series,
int item) {
return getY(series, item);
}
Returns the end y-value for an item within a series. This method
maps directly to #getY(int, int) . |
public int getItemCount(int series) {
// defer argument checking
return getSeries(series).getItemCount();
}
Returns the number of items in the specified series. |
public XIntervalSeries getSeries(int series) {
if ((series < 0) || (series >= getSeriesCount())) {
throw new IllegalArgumentException("Series index out of bounds");
}
return (XIntervalSeries) this.data.get(series);
}
Returns a series from the collection. |
public int getSeriesCount() {
return this.data.size();
}
Returns the number of series in the collection. |
public Comparable getSeriesKey(int series) {
// defer argument checking
return getSeries(series).getKey();
}
Returns the key for a series. |
public Number getStartX(int series,
int item) {
XIntervalSeries s = (XIntervalSeries) this.data.get(series);
XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
return new Double(di.getXLowValue());
}
Returns the start x-value for an item within a series. |
public double getStartXValue(int series,
int item) {
XIntervalSeries s = (XIntervalSeries) this.data.get(series);
return s.getXLowValue(item);
}
Returns the start x-value (as a double primitive) for an item within a
series. |
public Number getStartY(int series,
int item) {
return getY(series, item);
}
Returns the start y-value for an item within a series. This method
maps directly to #getY(int, int) . |
public Number getX(int series,
int item) {
XIntervalSeries s = (XIntervalSeries) this.data.get(series);
XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
return di.getX();
}
Returns the x-value for an item within a series. |
public Number getY(int series,
int item) {
XIntervalSeries s = (XIntervalSeries) this.data.get(series);
XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
return new Double(di.getYValue());
}
Returns the y-value for an item within a series. |
public double getYValue(int series,
int item) {
XIntervalSeries s = (XIntervalSeries) this.data.get(series);
return s.getYValue(item);
}
Returns the y-value (as a double primitive) for an item within a
series. |
public void removeAllSeries() {
// Unregister the collection as a change listener to each series in
// the collection.
for (int i = 0; i < this.data.size(); i++) {
XIntervalSeries series = (XIntervalSeries) this.data.get(i);
series.removeChangeListener(this);
}
this.data.clear();
fireDatasetChanged();
}
Removes all the series from the collection and sends a
DatasetChangeEvent to all registered listeners. |
public void removeSeries(int series) {
if ((series < 0) || (series >= getSeriesCount())) {
throw new IllegalArgumentException("Series index out of bounds.");
}
XIntervalSeries ts = (XIntervalSeries) this.data.get(series);
ts.removeChangeListener(this);
this.data.remove(series);
fireDatasetChanged();
}
Removes a series from the collection and sends a
DatasetChangeEvent to all registered listeners. |
public void removeSeries(XIntervalSeries series) {
if (series == null) {
throw new IllegalArgumentException("Null 'series' argument.");
}
if (this.data.contains(series)) {
series.removeChangeListener(this);
this.data.remove(series);
fireDatasetChanged();
}
}
Removes a series from the collection and sends a
DatasetChangeEvent to all registered listeners. |