Example usage for org.jfree.data.xy DefaultWindDataset getClass

List of usage examples for org.jfree.data.xy DefaultWindDataset getClass

Introduction

In this page you can find the example usage for org.jfree.data.xy DefaultWindDataset getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

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

/**
 * Confirm that cloning works./*w ww.  j  av  a 2  s.c o m*/
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    DefaultWindDataset d1 = new DefaultWindDataset();
    DefaultWindDataset d2 = (DefaultWindDataset) d1.clone();
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));

    // try a dataset with some content...
    d1 = createSampleDataset1();
    d2 = (DefaultWindDataset) d1.clone();
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));
}

From source file:org.jfree.data.xy.junit.DefaultWindDatasetTest.java

/**
 * Confirm that cloning works.//from ww  w  . j a v  a2 s .  co m
 */
public void testCloning() {
    DefaultWindDataset d1 = new DefaultWindDataset();
    DefaultWindDataset d2 = null;
    try {
        d2 = (DefaultWindDataset) d1.clone();
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
    }
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));

    // try a dataset with some content...
    d1 = createSampleDataset1();
    d2 = null;
    try {
        d2 = (DefaultWindDataset) d1.clone();
    } catch (CloneNotSupportedException e) {
        e.printStackTrace();
    }
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));
}