Example usage for org.jfree.data.time.ohlc OHLCItem clone

List of usage examples for org.jfree.data.time.ohlc OHLCItem clone

Introduction

In this page you can find the example usage for org.jfree.data.time.ohlc OHLCItem clone.

Prototype

@Override
public Object clone() throws CloneNotSupportedException 

Source Link

Document

Returns a clone of this object.

Usage

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));
}