/** * Returns the series having the specified index. * * @param seriesIndex zero-based series index. * * @return The series. */ public MatrixSeries getSeries(int seriesIndex) { if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); return series; }
/** * Returns the series having the specified index. * * @param seriesIndex zero-based series index. * * @return The series. * * @throws IllegalArgumentException */ public MatrixSeries getSeries(int seriesIndex) { if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); return series; }
/** * Removes a series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * * @param seriesIndex the series (zero based index). */ public void removeSeries(int seriesIndex) { // check arguments... if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } // fetch the series, remove the change listener, then remove the series. MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); series.removeChangeListener(this); this.seriesList.remove(seriesIndex); fireDatasetChanged(); }
/** * Removes a series from the collection. * <P> * Notifies all registered listeners that the dataset has changed. * * @param seriesIndex the series (zero based index). * * @throws IllegalArgumentException */ public void removeSeries(int seriesIndex) { // check arguments... if ((seriesIndex < 0) || (seriesIndex > getSeriesCount())) { throw new IllegalArgumentException("Index outside valid range."); } // fetch the series, remove the change listener, then remove the series. MatrixSeries series = (MatrixSeries) this.seriesList.get(seriesIndex); series.removeChangeListener(this); this.seriesList.remove(seriesIndex); fireDatasetChanged(); }