Example usage for org.jfree.data Range hashCode

List of usage examples for org.jfree.data Range hashCode

Introduction

In this page you can find the example usage for org.jfree.data Range hashCode.

Prototype

@Override
public int hashCode() 

Source Link

Document

Returns a hash code.

Usage

From source file:org.jfree.data.RangeTest.java

/**
 * Two objects that are equal are required to return the same hashCode.
 *//*w w w . java 2  s.  c om*/
@Test
public void testHashCode() {
    Range a1 = new Range(1.0, 100.0);
    Range a2 = new Range(1.0, 100.0);
    assertEquals(a1.hashCode(), a2.hashCode());

    a1 = new Range(-100.0, 2.0);
    a2 = new Range(-100.0, 2.0);
    assertEquals(a1.hashCode(), a2.hashCode());
}