List of usage examples for org.jfree.data.xy IntervalXYDelegate clone
@Override public Object clone() throws CloneNotSupportedException
From source file:org.jfree.data.xy.IntervalXYDelegateTest.java
/** * Confirm that cloning works.//from w w w.j a v a2 s .c om */ @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(); assertTrue(d1 != d2); assertTrue(d1.getClass() == d2.getClass()); assertTrue(d1.equals(d2)); }