Example usage for org.jfree.data.xy XIntervalDataItem clone

List of usage examples for org.jfree.data.xy XIntervalDataItem clone

Introduction

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

Prototype

@Override
public Object clone() throws CloneNotSupportedException 

Source Link

Document

Returns a clone of this object.

Usage

From source file:org.jfree.data.xy.XIntervalDataItemTest.java

/**
 * Some checks for the clone() method.//www  .  j a va2 s.  c  om
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);
    XIntervalDataItem item2 = (XIntervalDataItem) item1.clone();
    assertTrue(item1 != item2);
    assertTrue(item1.getClass() == item2.getClass());
    assertTrue(item1.equals(item2));
}