List of usage examples for org.jfree.data.time TimeTableXYDataset clone
@Override public Object clone() throws CloneNotSupportedException
From source file:org.jfree.data.time.TimeTableXYDatasetTest.java
/** * Some checks for cloning.//from w w w . j a v a2 s. co m */ @Test public void testClone() { TimeTableXYDataset d = new TimeTableXYDataset(); d.add(new Year(1999), 25.0, "Series"); TimeTableXYDataset clone = null; try { clone = (TimeTableXYDataset) d.clone(); } catch (CloneNotSupportedException e) { assertTrue(false); } assertTrue(clone.equals(d)); // now test that the clone is independent of the original clone.add(new Year(2004), 1.2, "SS"); assertFalse(clone.equals(d)); }