Example usage for org.jfree.data.time.ohlc OHLCSeriesCollection getClass

List of usage examples for org.jfree.data.time.ohlc OHLCSeriesCollection getClass

Introduction

In this page you can find the example usage for org.jfree.data.time.ohlc OHLCSeriesCollection 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.time.ohlc.OHLCSeriesCollectionTest.java

/**
 * Confirm that cloning works.// w  w w .  j a  va2  s  . c om
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    OHLCSeriesCollection c1 = new OHLCSeriesCollection();
    OHLCSeries s1 = new OHLCSeries("Series");
    s1.add(new Year(2006), 1.0, 1.1, 1.2, 1.3);
    c1.addSeries(s1);
    OHLCSeriesCollection c2 = (OHLCSeriesCollection) c1.clone();
    assertTrue(c1 != c2);
    assertTrue(c1.getClass() == c2.getClass());
    assertTrue(c1.equals(c2));

    // check independence
    s1.setDescription("XYZ");
    assertFalse(c1.equals(c2));
}