@Test public void testCloning() throws CloneNotSupportedException { XYSeries s1 = new XYSeries("Series"); s1.add(1.2, 3.4); XYSeriesCollection c1 = new XYSeriesCollection(); c1.addSeries(s1); IntervalXYDelegate d1 = new IntervalXYDelegate(c1); IntervalXYDelegate d2 = (IntervalXYDelegate) d1.clone(); assertNotSame(d1, d2); assertSame(d1.getClass(), d2.getClass()); assertEquals(d1, d2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
IntervalXYDelegate implements DatasetChangeListener,
        DomainInfo, Serializable, Cloneable, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
IntervalXYDelegate implements DatasetChangeListener,
        DomainInfo, Serializable, Cloneable, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } IntervalXYDelegate(XYDataset dataset);  IntervalXYDelegate(XYDataset dataset, boolean autoWidth); }
IntervalXYDelegate implements DatasetChangeListener,
        DomainInfo, Serializable, Cloneable, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } IntervalXYDelegate(XYDataset dataset);  IntervalXYDelegate(XYDataset dataset, boolean autoWidth); boolean isAutoWidth(); void setAutoWidth(boolean b); double getIntervalPositionFactor(); void setIntervalPositionFactor(double d); double getFixedIntervalWidth(); void setFixedIntervalWidth(double w); double getIntervalWidth(); Number getStartX(int series, int item); double getStartXValue(int series, int item); Number getEndX(int series, int item); double getEndXValue(int series, int item); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); @Override void datasetChanged(DatasetChangeEvent e); @Override boolean equals(Object obj); @Override Object clone(); @Override int hashCode(); }
IntervalXYDelegate implements DatasetChangeListener,
        DomainInfo, Serializable, Cloneable, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } IntervalXYDelegate(XYDataset dataset);  IntervalXYDelegate(XYDataset dataset, boolean autoWidth); boolean isAutoWidth(); void setAutoWidth(boolean b); double getIntervalPositionFactor(); void setIntervalPositionFactor(double d); double getFixedIntervalWidth(); void setFixedIntervalWidth(double w); double getIntervalWidth(); Number getStartX(int series, int item); double getStartXValue(int series, int item); Number getEndX(int series, int item); double getEndXValue(int series, int item); @Override double getDomainLowerBound(boolean includeInterval); @Override double getDomainUpperBound(boolean includeInterval); @Override Range getDomainBounds(boolean includeInterval); @Override void datasetChanged(DatasetChangeEvent e); @Override boolean equals(Object obj); @Override Object clone(); @Override int hashCode();  }