Example usage for org.jfree.data.time Quarter hashCode

List of usage examples for org.jfree.data.time Quarter hashCode

Introduction

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

Prototype

@Override
public int hashCode() 

Source Link

Document

Returns a hash code for this object instance.

Usage

From source file:org.jfree.data.time.QuarterTest.java

/**
 * Two objects that are equal are required to return the same hashCode.
 *///  ww  w  . ja v a2  s .c om
@Test
public void testHashcode() {
    Quarter q1 = new Quarter(2, 2003);
    Quarter q2 = new Quarter(2, 2003);
    assertTrue(q1.equals(q2));
    int h1 = q1.hashCode();
    int h2 = q2.hashCode();
    assertEquals(h1, h2);
}