@Test public void testCloning2() throws CloneNotSupportedException { DefaultIntervalCategoryDataset d1 = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); DefaultIntervalCategoryDataset d2 = (DefaultIntervalCategoryDataset) d1.clone(); assertNotSame(d1, d2); assertSame(d1.getClass(), d2.getClass()); assertEquals(d1, d2); }
@Override public Object clone() throws CloneNotSupportedException { DefaultIntervalCategoryDataset clone = (DefaultIntervalCategoryDataset) super.clone(); clone.categoryKeys = this.categoryKeys.clone(); clone.seriesKeys = this.seriesKeys.clone(); clone.startData = clone(this.startData); clone.endData = clone(this.endData); return clone; }
DefaultIntervalCategoryDataset extends AbstractSeriesDataset implements IntervalCategoryDataset { @Override public Object clone() throws CloneNotSupportedException { DefaultIntervalCategoryDataset clone = (DefaultIntervalCategoryDataset) super.clone(); clone.categoryKeys = this.categoryKeys.clone(); clone.seriesKeys = this.seriesKeys.clone(); clone.startData = clone(this.startData); clone.endData = clone(this.endData); return clone; } }
DefaultIntervalCategoryDataset extends AbstractSeriesDataset implements IntervalCategoryDataset { @Override public Object clone() throws CloneNotSupportedException { DefaultIntervalCategoryDataset clone = (DefaultIntervalCategoryDataset) super.clone(); clone.categoryKeys = this.categoryKeys.clone(); clone.seriesKeys = this.seriesKeys.clone(); clone.startData = clone(this.startData); clone.endData = clone(this.endData); return clone; } DefaultIntervalCategoryDataset(double[][] starts, double[][] ends);  DefaultIntervalCategoryDataset(Number[][] starts, Number[][] ends);  DefaultIntervalCategoryDataset(String[] seriesNames,
                                          Number[][] starts,
                                          Number[][] ends);  DefaultIntervalCategoryDataset(Comparable[] seriesKeys,
                                          Comparable[] categoryKeys,
                                          Number[][] starts,
                                          Number[][] ends); }
DefaultIntervalCategoryDataset extends AbstractSeriesDataset implements IntervalCategoryDataset { @Override public Object clone() throws CloneNotSupportedException { DefaultIntervalCategoryDataset clone = (DefaultIntervalCategoryDataset) super.clone(); clone.categoryKeys = this.categoryKeys.clone(); clone.seriesKeys = this.seriesKeys.clone(); clone.startData = clone(this.startData); clone.endData = clone(this.endData); return clone; } DefaultIntervalCategoryDataset(double[][] starts, double[][] ends);  DefaultIntervalCategoryDataset(Number[][] starts, Number[][] ends);  DefaultIntervalCategoryDataset(String[] seriesNames,
                                          Number[][] starts,
                                          Number[][] ends);  DefaultIntervalCategoryDataset(Comparable[] seriesKeys,
                                          Comparable[] categoryKeys,
                                          Number[][] starts,
                                          Number[][] ends); @Override int getSeriesCount(); int getSeriesIndex(Comparable seriesKey); @Override Comparable getSeriesKey(int series); void setSeriesKeys(Comparable[] seriesKeys); int getCategoryCount(); @Override List<Comparable> getColumnKeys(); void setCategoryKeys(Comparable[] categoryKeys); @Override Number getValue(Comparable series, Comparable category); @Override Number getValue(int series, int category); @Override Number getStartValue(Comparable series, Comparable category); @Override Number getStartValue(int series, int category); @Override Number getEndValue(Comparable series, Comparable category); @Override Number getEndValue(int series, int category); void setStartValue(int series, Comparable category, Number value); void setEndValue(int series, Comparable category, Number value); int getCategoryIndex(Comparable category); @Override Comparable getColumnKey(int column); @Override int getColumnIndex(Comparable columnKey); @Override int getRowIndex(Comparable rowKey); @Override List<Comparable> getRowKeys(); @Override Comparable getRowKey(int row); @Override int getColumnCount(); @Override int getRowCount(); @Override boolean equals(Object obj); @Override Object clone(); }
DefaultIntervalCategoryDataset extends AbstractSeriesDataset implements IntervalCategoryDataset { @Override public Object clone() throws CloneNotSupportedException { DefaultIntervalCategoryDataset clone = (DefaultIntervalCategoryDataset) super.clone(); clone.categoryKeys = this.categoryKeys.clone(); clone.seriesKeys = this.seriesKeys.clone(); clone.startData = clone(this.startData); clone.endData = clone(this.endData); return clone; } DefaultIntervalCategoryDataset(double[][] starts, double[][] ends);  DefaultIntervalCategoryDataset(Number[][] starts, Number[][] ends);  DefaultIntervalCategoryDataset(String[] seriesNames,
                                          Number[][] starts,
                                          Number[][] ends);  DefaultIntervalCategoryDataset(Comparable[] seriesKeys,
                                          Comparable[] categoryKeys,
                                          Number[][] starts,
                                          Number[][] ends); @Override int getSeriesCount(); int getSeriesIndex(Comparable seriesKey); @Override Comparable getSeriesKey(int series); void setSeriesKeys(Comparable[] seriesKeys); int getCategoryCount(); @Override List<Comparable> getColumnKeys(); void setCategoryKeys(Comparable[] categoryKeys); @Override Number getValue(Comparable series, Comparable category); @Override Number getValue(int series, int category); @Override Number getStartValue(Comparable series, Comparable category); @Override Number getStartValue(int series, int category); @Override Number getEndValue(Comparable series, Comparable category); @Override Number getEndValue(int series, int category); void setStartValue(int series, Comparable category, Number value); void setEndValue(int series, Comparable category, Number value); int getCategoryIndex(Comparable category); @Override Comparable getColumnKey(int column); @Override int getColumnIndex(Comparable columnKey); @Override int getRowIndex(Comparable rowKey); @Override List<Comparable> getRowKeys(); @Override Comparable getRowKey(int row); @Override int getColumnCount(); @Override int getRowCount(); @Override boolean equals(Object obj); @Override Object clone();  }