List of usage examples for org.jfree.data.time Hour hashCode
@Override public int hashCode()
From source file:org.jfree.data.time.HourTest.java
/** * Two objects that are equal are required to return the same hashCode. *//*from w w w .j av a 2s . c o m*/ @Test public void testHashcode() { Hour h1 = new Hour(7, 9, 10, 1999); Hour h2 = new Hour(7, 9, 10, 1999); assertTrue(h1.equals(h2)); int hash1 = h1.hashCode(); int hash2 = h2.hashCode(); assertEquals(hash1, hash2); }
From source file:org.jfree.data.time.junit.HourTest.java
/** * Two objects that are equal are required to return the same hashCode. *//*from ww w.jav a 2 s . co m*/ public void testHashcode() { Hour h1 = new Hour(7, 9, 10, 1999); Hour h2 = new Hour(7, 9, 10, 1999); assertTrue(h1.equals(h2)); int hash1 = h1.hashCode(); int hash2 = h2.hashCode(); assertEquals(hash1, hash2); }