List of usage examples for org.jfree.data.time SimpleTimePeriod hashCode
@Override public int hashCode()
From source file:org.jfree.data.time.SimpleTimePeriodTest.java
/** * Two objects that are equal are required to return the same hashCode. *//* w w w . j a va 2s . com*/ @Test public void testHashcode() { SimpleTimePeriod s1 = new SimpleTimePeriod(new Date(10L), new Date(20L)); SimpleTimePeriod s2 = new SimpleTimePeriod(new Date(10L), new Date(20L)); assertTrue(s1.equals(s2)); int h1 = s1.hashCode(); int h2 = s2.hashCode(); assertEquals(h1, h2); }