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

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

Introduction

In this page you can find the example usage for org.jfree.data.xy XYIntervalDataItem 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.XYIntervalDataItemTest.java

/**
 * Some checks for the clone() method./*w  w w . j a  va2 s. com*/
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    XYIntervalDataItem item1 = new XYIntervalDataItem(1.0, 0.5, 1.5, 2.0, 1.9, 2.1);
    XYIntervalDataItem item2 = (XYIntervalDataItem) item1.clone();
    assertTrue(item1 != item2);
    assertTrue(item1.getClass() == item2.getClass());
    assertTrue(item1.equals(item2));
}