@Test public void testRemoveSeries() { VectorSeries s1 = new VectorSeries("S1"); VectorSeries s2 = new VectorSeries("S2"); VectorSeriesCollection vsc = new VectorSeriesCollection(); vsc.addSeries(s1); vsc.addSeries(s2); assertEquals(2, vsc.getSeriesCount()); boolean b = vsc.removeSeries(s1); assertTrue(b); assertEquals(1, vsc.getSeriesCount()); assertEquals("S2", vsc.getSeriesKey(0)); b = vsc.removeSeries(new VectorSeries("NotInDataset")); assertFalse(b); assertEquals(1, vsc.getSeriesCount()); b = vsc.removeSeries(s2); assertTrue(b); assertEquals(0, vsc.getSeriesCount()); }
public boolean removeSeries(VectorSeries series) { ParamChecks.nullNotPermitted(series, "series"); boolean removed = this.data.remove(series); if (removed) { series.removeChangeListener(this); fireDatasetChanged(); } return removed; }
VectorSeriesCollection extends AbstractXYDataset implements VectorXYDataset, PublicCloneable, Serializable { public boolean removeSeries(VectorSeries series) { ParamChecks.nullNotPermitted(series, "series"); boolean removed = this.data.remove(series); if (removed) { series.removeChangeListener(this); fireDatasetChanged(); } return removed; } }
VectorSeriesCollection extends AbstractXYDataset implements VectorXYDataset, PublicCloneable, Serializable { public boolean removeSeries(VectorSeries series) { ParamChecks.nullNotPermitted(series, "series"); boolean removed = this.data.remove(series); if (removed) { series.removeChangeListener(this); fireDatasetChanged(); } return removed; } VectorSeriesCollection(); }
VectorSeriesCollection extends AbstractXYDataset implements VectorXYDataset, PublicCloneable, Serializable { public boolean removeSeries(VectorSeries series) { ParamChecks.nullNotPermitted(series, "series"); boolean removed = this.data.remove(series); if (removed) { series.removeChangeListener(this); fireDatasetChanged(); } return removed; } VectorSeriesCollection(); void addSeries(VectorSeries series); boolean removeSeries(VectorSeries series); void removeAllSeries(); @Override int getSeriesCount(); VectorSeries getSeries(int series); @Override Comparable getSeriesKey(int series); int indexOf(VectorSeries series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override Number getX(int series, int item); @Override double getYValue(int series, int item); @Override Number getY(int series, int item); @Override Vector getVector(int series, int item); @Override double getVectorXValue(int series, int item); @Override double getVectorYValue(int series, int item); @Override boolean equals(Object obj); @Override Object clone(); }
VectorSeriesCollection extends AbstractXYDataset implements VectorXYDataset, PublicCloneable, Serializable { public boolean removeSeries(VectorSeries series) { ParamChecks.nullNotPermitted(series, "series"); boolean removed = this.data.remove(series); if (removed) { series.removeChangeListener(this); fireDatasetChanged(); } return removed; } VectorSeriesCollection(); void addSeries(VectorSeries series); boolean removeSeries(VectorSeries series); void removeAllSeries(); @Override int getSeriesCount(); VectorSeries getSeries(int series); @Override Comparable getSeriesKey(int series); int indexOf(VectorSeries series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override Number getX(int series, int item); @Override double getYValue(int series, int item); @Override Number getY(int series, int item); @Override Vector getVector(int series, int item); @Override double getVectorXValue(int series, int item); @Override double getVectorYValue(int series, int item); @Override boolean equals(Object obj); @Override Object clone();  }