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

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

Introduction

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

/**
 * Confirm that cloning works./*from  w w  w  .  ja va  2  s . c o  m*/
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    DefaultKeyedValuesDataset d1 = new DefaultKeyedValuesDataset();
    d1.setValue("V1", new Integer(1));
    d1.setValue("V2", null);
    d1.setValue("V3", new Integer(3));
    DefaultKeyedValuesDataset d2 = (DefaultKeyedValuesDataset) d1.clone();
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));
}