List of usage examples for org.jfree.data.time.ohlc OHLCItem hashCode
@Override public int hashCode()
From source file:org.jfree.data.time.ohlc.OHLCItemTest.java
/** * Two objects that are equal are required to return the same hashCode. *//* ww w. j ava2 s . c om*/ @Test public void testHashcode() { OHLCItem i1 = new OHLCItem(new Year(2009), 2.0, 4.0, 1.0, 3.0); OHLCItem i2 = new OHLCItem(new Year(2009), 2.0, 4.0, 1.0, 3.0); assertTrue(i1.equals(i2)); int h1 = i1.hashCode(); int h2 = i2.hashCode(); assertEquals(h1, h2); }