/** * Returns a series from the collection. * * @param series the series index (zero-based). * * @return The series. * * @throws IllegalArgumentException if {@code series} is not in the * range {@code 0} to {@code getSeriesCount() - 1}. */ public YIntervalSeries getSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return (YIntervalSeries) this.data.get(series); }
/** * Returns a series from the collection. * * @param series the series index (zero-based). * * @return The series. * * @throws IllegalArgumentException if <code>series</code> is not in the * range <code>0</code> to <code>getSeriesCount() - 1</code>. */ public YIntervalSeries getSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return (YIntervalSeries) this.data.get(series); }
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * * @since 1.0.10 */ public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } YIntervalSeries ts = (YIntervalSeries) this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); }
/** * Removes a series from the collection and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * * @since 1.0.10 */ public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } YIntervalSeries ts = (YIntervalSeries) this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged(); }