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

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

Introduction

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *///w  w  w.j a v a  2s  .  co m
@Test
public void testHashcode() {
    Week w1 = new Week(2, 2003);
    Week w2 = new Week(2, 2003);
    assertTrue(w1.equals(w2));
    int h1 = w1.hashCode();
    int h2 = w2.hashCode();
    assertEquals(h1, h2);
}