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

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

Introduction

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *///from  ww w  .j  av  a 2  s .c  o m
@Test
public void testHashcode() {
    Day d1 = new Day(1, 2, 2003);
    Day d2 = new Day(1, 2, 2003);
    assertTrue(d1.equals(d2));
    int h1 = d1.hashCode();
    int h2 = d2.hashCode();
    assertEquals(h1, h2);
}

From source file:org.jfree.data.time.junit.DayTest.java

/**
 * Two objects that are equal are required to return the same hashCode.
 *//*from  w  w  w .  j a va2 s  . c o  m*/
public void testHashcode() {
    Day d1 = new Day(1, 2, 2003);
    Day d2 = new Day(1, 2, 2003);
    assertTrue(d1.equals(d2));
    int h1 = d1.hashCode();
    int h2 = d2.hashCode();
    assertEquals(h1, h2);
}