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

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

Introduction

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

/**
 * Some checks for the clone() method.//from w  w w  .  j  a va 2 s .  co m
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    YIntervalDataItem item1 = new YIntervalDataItem(1.0, 2.0, 1.5, 2.5);
    YIntervalDataItem item2 = (YIntervalDataItem) item1.clone();
    assertTrue(item1 != item2);
    assertTrue(item1.getClass() == item2.getClass());
    assertTrue(item1.equals(item2));
}