List of usage examples for org.jfree.data.time.ohlc OHLCItem clone
@Override public Object clone() throws CloneNotSupportedException
From source file:org.jfree.data.time.ohlc.OHLCItemTest.java
/** * Some checks for the clone() method./* w w w . j a v a 2 s . c o m*/ */ @Test public void testCloning() throws CloneNotSupportedException { OHLCItem item1 = new OHLCItem(new Year(2006), 2.0, 4.0, 1.0, 3.0); OHLCItem item2 = (OHLCItem) item1.clone(); assertTrue(item1 != item2); assertTrue(item1.getClass() == item2.getClass()); assertTrue(item1.equals(item2)); }