Example usage for org.jfree.data ComparableObjectItem clone

List of usage examples for org.jfree.data ComparableObjectItem clone

Introduction

In this page you can find the example usage for org.jfree.data ComparableObjectItem clone.

Prototype

@Override
public Object clone() throws CloneNotSupportedException 

Source Link

Document

Returns a clone of this object.

Usage

From source file:org.jfree.data.ComparableObjectItemTest.java

/**
 * Some checks for the clone() method.// www . j a va2  s . co m
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    ComparableObjectItem item1 = new ComparableObjectItem(new Integer(1), "XYZ");
    ComparableObjectItem item2 = (ComparableObjectItem) item1.clone();
    assertNotSame(item1, item2);
    assertSame(item1.getClass(), item2.getClass());
    assertEquals(item1, item2);
}