Example usage for org.jfree.data DefaultKeyedValue getClass

List of usage examples for org.jfree.data DefaultKeyedValue getClass

Introduction

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

/**
 * Some checks for the clone() method./*  ww w  . java 2  s  .c  om*/
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    DefaultKeyedValue v1 = new DefaultKeyedValue("Test", new Double(45.5));
    DefaultKeyedValue v2 = (DefaultKeyedValue) v1.clone();
    assertTrue(v1 != v2);
    assertTrue(v1.getClass() == v2.getClass());
    assertTrue(v1.equals(v2));

    // confirm that the clone is independent of the original
    v2.setValue(new Double(12.3));
    assertFalse(v1.equals(v2));
}