Example usage for org.jfree.data.general KeyedValueDataset getKey

List of usage examples for org.jfree.data.general KeyedValueDataset getKey

Introduction

In this page you can find the example usage for org.jfree.data.general KeyedValueDataset getKey.

Prototype

public Comparable getKey();

Source Link

Document

Returns the key associated with the value.

Usage

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

/**
 * Tests this dataset for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.//from   w  ww  .  ja  v  a  2  s  .c  o m
 */
@Override
public boolean equals(Object obj) {
    if (obj == this) {
        return true;
    }
    if (!(obj instanceof KeyedValueDataset)) {
        return false;
    }
    KeyedValueDataset that = (KeyedValueDataset) obj;
    if (this.data == null) {
        if (that.getKey() != null || that.getValue() != null) {
            return false;
        }
        return true;
    }
    if (!ObjectUtils.equal(this.data.getKey(), that.getKey())) {
        return false;
    }
    if (!ObjectUtils.equal(this.data.getValue(), that.getValue())) {
        return false;
    }
    return true;
}