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

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

Introduction

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *//*  ww  w.  j  a v  a  2 s.c o  m*/
@Test
public void testHashcode() {
    FixedMillisecond m1 = new FixedMillisecond(500000L);
    FixedMillisecond m2 = new FixedMillisecond(500000L);
    assertTrue(m1.equals(m2));
    int h1 = m1.hashCode();
    int h2 = m2.hashCode();
    assertEquals(h1, h2);
}