Example usage for org.jfree.data.xy Vector hashCode

List of usage examples for org.jfree.data.xy Vector hashCode

Introduction

In this page you can find the example usage for org.jfree.data.xy Vector hashCode.

Prototype

@Override
public int hashCode() 

Source Link

Document

Returns a hash code for this instance.

Usage

From source file:org.jfree.data.xy.VectorTest.java

/**
 * Two objects that are equal are required to return the same hashCode.
 *///from  w ww.  j  a  v a 2s.  co  m
@Test
public void testHashcode() {
    Vector v1 = new Vector(1.0, 2.0);
    Vector v2 = new Vector(1.0, 2.0);
    assertTrue(v1.equals(v2));
    int h1 = v1.hashCode();
    int h2 = v2.hashCode();
    assertEquals(h1, h2);
}