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

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

Introduction

In this page you can find the example usage for org.jfree.data.general DefaultKeyedValuesDataset equals.

Prototype

@Override
public boolean equals(Object obj) 

Source Link

Document

Tests if this object is equal to another.

Usage

From source file:org.jfree.data.general.DefaultKeyedValuesDatasetTest.java

/**
 * Confirm that cloning works./*  w w w. j av a2 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));
}