Example usage for org.jfree.data.gantt Task clone

List of usage examples for org.jfree.data.gantt Task clone

Introduction

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

Prototype

@Override
public Object clone() throws CloneNotSupportedException 

Source Link

Document

Returns a clone of the task.

Usage

From source file:org.jfree.data.gantt.TaskTest.java

/**
 * Confirm that cloning works.//from www  .  java  2  s . c  o m
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    Task t1 = new Task("T", new Date(1), new Date(2));
    Task t2 = (Task) t1.clone();
    assertTrue(t1 != t2);
    assertTrue(t1.getClass() == t2.getClass());
    assertTrue(t1.equals(t2));
}