Example usage for org.jfree.data.statistics SimpleHistogramDataset getClass

List of usage examples for org.jfree.data.statistics SimpleHistogramDataset getClass

Introduction

In this page you can find the example usage for org.jfree.data.statistics SimpleHistogramDataset 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.statistics.SimpleHistogramDatasetTest.java

/**
 * Some checks for the clone() method.//from   w w w . ja v a2 s .  c o  m
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    SimpleHistogramDataset d1 = new SimpleHistogramDataset("Dataset 1");
    SimpleHistogramDataset d2 = (SimpleHistogramDataset) d1.clone();
    assertTrue(d1 != d2);
    assertTrue(d1.getClass() == d2.getClass());
    assertTrue(d1.equals(d2));

    // check that clone is independent of the original
    d2.addBin(new SimpleHistogramBin(2.0, 3.0));
    d2.addObservation(2.3);
    assertFalse(d1.equals(d2));
}