@Test public void testGetSeriesKey() { DefaultIntervalXYDataset d = createSampleDataset1(); assertEquals("S1", d.getSeriesKey(0)); assertEquals("S2", d.getSeriesKey(1)); try { d.getSeriesKey(-1); fail("IllegalArgumentException should have been thrown on negative key"); } catch (IllegalArgumentException e) { assertEquals("Series index out of bounds", e.getMessage()); } try { d.getSeriesKey(2); fail("IllegalArgumentException should have been thrown on key out of range"); } catch (IllegalArgumentException e) { assertEquals("Series index out of bounds", e.getMessage()); } }
@Override public Comparable getSeriesKey(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return this.seriesKeys.get(series); }
DefaultIntervalXYDataset extends AbstractIntervalXYDataset implements PublicCloneable { @Override public Comparable getSeriesKey(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return this.seriesKeys.get(series); } }
DefaultIntervalXYDataset extends AbstractIntervalXYDataset implements PublicCloneable { @Override public Comparable getSeriesKey(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return this.seriesKeys.get(series); } DefaultIntervalXYDataset(); }
DefaultIntervalXYDataset extends AbstractIntervalXYDataset implements PublicCloneable { @Override public Comparable getSeriesKey(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return this.seriesKeys.get(series); } DefaultIntervalXYDataset(); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override double getYValue(int series, int item); @Override double getStartXValue(int series, int item); @Override double getEndXValue(int series, int item); @Override double getStartYValue(int series, int item); @Override double getEndYValue(int series, int item); @Override Number getEndX(int series, int item); @Override Number getEndY(int series, int item); @Override Number getStartX(int series, int item); @Override Number getStartY(int series, int item); @Override Number getX(int series, int item); @Override Number getY(int series, int item); void addSeries(Comparable seriesKey, double[][] data); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
DefaultIntervalXYDataset extends AbstractIntervalXYDataset implements PublicCloneable { @Override public Comparable getSeriesKey(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds"); } return this.seriesKeys.get(series); } DefaultIntervalXYDataset(); @Override int getSeriesCount(); @Override Comparable getSeriesKey(int series); @Override int getItemCount(int series); @Override double getXValue(int series, int item); @Override double getYValue(int series, int item); @Override double getStartXValue(int series, int item); @Override double getEndXValue(int series, int item); @Override double getStartYValue(int series, int item); @Override double getEndYValue(int series, int item); @Override Number getEndX(int series, int item); @Override Number getEndY(int series, int item); @Override Number getStartX(int series, int item); @Override Number getStartY(int series, int item); @Override Number getX(int series, int item); @Override Number getY(int series, int item); void addSeries(Comparable seriesKey, double[][] data); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }