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

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

Introduction

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *///from w  w  w .j a  v  a 2  s  . com
@Test
public void testHashcode() {
    Year y1 = new Year(1988);
    Year y2 = new Year(1988);
    assertTrue(y1.equals(y2));
    int h1 = y1.hashCode();
    int h2 = y2.hashCode();
    assertEquals(h1, h2);
}