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

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

Introduction

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *///from  w  w  w.  j  av a2  s.  c o m
@Test
public void testHashcode() {
    Second s1 = new Second(13, 45, 5, 1, 2, 2003);
    Second s2 = new Second(13, 45, 5, 1, 2, 2003);
    assertTrue(s1.equals(s2));
    int h1 = s1.hashCode();
    int h2 = s2.hashCode();
    assertEquals(h1, h2);
}

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *//*w  w w .  j  a v a2 s .co m*/
public void testHashcode() {
    Second s1 = new Second(13, 45, 5, 1, 2, 2003);
    Second s2 = new Second(13, 45, 5, 1, 2, 2003);
    assertTrue(s1.equals(s2));
    int h1 = s1.hashCode();
    int h2 = s2.hashCode();
    assertEquals(h1, h2);
}