Example usage for org.jfree.data.general DefaultKeyedValues2DDataset getClass

List of usage examples for org.jfree.data.general DefaultKeyedValues2DDataset getClass

Introduction

In this page you can find the example usage for org.jfree.data.general DefaultKeyedValues2DDataset 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.general.DefaultKeyedValues2DDatasetTest.java

/**
 * Confirm that cloning works.// w w  w  .  ja v  a2  s  .c  om
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    DefaultKeyedValues2DDataset d1 = new DefaultKeyedValues2DDataset();
    d1.setValue(new Integer(1), "V1", "C1");
    d1.setValue(null, "V2", "C1");
    d1.setValue(new Integer(3), "V3", "C2");
    DefaultKeyedValues2DDataset d2 = (DefaultKeyedValues2DDataset) d1.clone();
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));
}