Example usage for org.jfree.data.time.ohlc OHLC hashCode

List of usage examples for org.jfree.data.time.ohlc OHLC hashCode

Introduction

In this page you can find the example usage for org.jfree.data.time.ohlc OHLC hashCode.

Prototype

@Override
public int hashCode() 

Source Link

Document

Returns a hash code for this instance.

Usage

From source file:org.jfree.data.time.ohlc.OHLCTest.java

/**
 * Two objects that are equal are required to return the same hashCode.
 *///w  w  w . j a va  2  s  . c  o m
@Test
public void testHashcode() {
    OHLC i1 = new OHLC(2.0, 4.0, 1.0, 3.0);
    OHLC i2 = new OHLC(2.0, 4.0, 1.0, 3.0);
    assertTrue(i1.equals(i2));
    int h1 = i1.hashCode();
    int h2 = i2.hashCode();
    assertEquals(h1, h2);
}