@Test public void testRemoveSeries() { XYIntervalSeriesCollection c = new XYIntervalSeriesCollection(); XYIntervalSeries s1 = new XYIntervalSeries("s1"); c.addSeries(s1); c.removeSeries(0); assertEquals(0, c.getSeriesCount()); c.addSeries(s1); try { c.removeSeries(-1); fail("IllegalArgumentException should have been thrown on negative key"); } catch (IllegalArgumentException e) { assertEquals("Series index out of bounds.", e.getMessage()); } try { c.removeSeries(1); fail("IllegalArgumentException should have been thrown on key out of range"); } catch (IllegalArgumentException e) { assertEquals("Series index out of bounds.", e.getMessage()); } }
public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } XYIntervalSeries ts = this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); }
XYIntervalSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, PublicCloneable, Serializable { public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } XYIntervalSeries ts = this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); } }
XYIntervalSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, PublicCloneable, Serializable { public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } XYIntervalSeries ts = this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); } XYIntervalSeriesCollection(); }
XYIntervalSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, PublicCloneable, Serializable { public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } XYIntervalSeries ts = this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); } XYIntervalSeriesCollection(); void addSeries(XYIntervalSeries series); @Override int getSeriesCount(); XYIntervalSeries getSeries(int series); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override double getStartXValue(int series, int item); @Override double getEndXValue(int series, int item); @Override double getYValue(int series, int item); @Override double getStartYValue(int series, int item); @Override double getEndYValue(int series, int item); @Override Number getY(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); void removeSeries(int series); void removeSeries(XYIntervalSeries series); void removeAllSeries(); @Override boolean equals(Object obj); @Override Object clone(); }
XYIntervalSeriesCollection extends AbstractIntervalXYDataset implements IntervalXYDataset, PublicCloneable, Serializable { public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } XYIntervalSeries ts = this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); } XYIntervalSeriesCollection(); void addSeries(XYIntervalSeries series); @Override int getSeriesCount(); XYIntervalSeries getSeries(int series); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override Number getX(int series, int item); @Override double getStartXValue(int series, int item); @Override double getEndXValue(int series, int item); @Override double getYValue(int series, int item); @Override double getStartYValue(int series, int item); @Override double getEndYValue(int series, int item); @Override Number getY(int series, int item); @Override Number getStartX(int series, int item); @Override Number getEndX(int series, int item); @Override Number getStartY(int series, int item); @Override Number getEndY(int series, int item); void removeSeries(int series); void removeSeries(XYIntervalSeries series); void removeAllSeries(); @Override boolean equals(Object obj); @Override Object clone();  }