Example usage for org.jfree.data.time Hour equals

List of usage examples for org.jfree.data.time Hour equals

Introduction

In this page you can find the example usage for org.jfree.data.time Hour equals.

Prototype

@Override
public boolean equals(Object obj) 

Source Link

Document

Tests the equality of this object against an arbitrary Object.

Usage

From source file:org.jfree.data.time.HourTest.java

/**
 * Check that an Hour instance is equal to itself.
 *
 * SourceForge Bug ID: 558850./*  w w  w . j  av  a  2  s. com*/
 */
@Test
public void testEqualsSelf() {
    Hour hour = new Hour();
    assertTrue(hour.equals(hour));
}

From source file:org.jfree.data.time.junit.HourTest.java

/**
 * Check that an Hour instance is equal to itself.
 *
 * SourceForge Bug ID: 558850.//from www  .  ja  va 2s . c om
 */
public void testEqualsSelf() {
    Hour hour = new Hour();
    assertTrue(hour.equals(hour));
}

From source file:org.jfree.data.time.HourTest.java

/**
 * Two objects that are equal are required to return the same hashCode.
 *//*  ww  w  . ja v  a 2  s  .c o m*/
@Test
public void testHashcode() {
    Hour h1 = new Hour(7, 9, 10, 1999);
    Hour h2 = new Hour(7, 9, 10, 1999);
    assertTrue(h1.equals(h2));
    int hash1 = h1.hashCode();
    int hash2 = h2.hashCode();
    assertEquals(hash1, hash2);
}

From source file:org.jfree.data.time.junit.HourTest.java

/**
 * Two objects that are equal are required to return the same hashCode.
 */// w  w w .  j  ava2s .c  om
public void testHashcode() {
    Hour h1 = new Hour(7, 9, 10, 1999);
    Hour h2 = new Hour(7, 9, 10, 1999);
    assertTrue(h1.equals(h2));
    int hash1 = h1.hashCode();
    int hash2 = h2.hashCode();
    assertEquals(hash1, hash2);
}

From source file:org.jfree.data.time.HourTest.java

/**
 * Tests the equals method.//from w w  w  .  j a  v  a2 s . c om
 */
@Test
public void testEquals() {
    Hour hour1 = new Hour(15, new Day(29, MonthConstants.MARCH, 2002));
    Hour hour2 = new Hour(15, new Day(29, MonthConstants.MARCH, 2002));
    assertTrue(hour1.equals(hour2));
}

From source file:org.jfree.data.time.junit.HourTest.java

/**
 * Tests the equals method.// w  ww  .j a va2 s  .  c  o m
 */
public void testEquals() {
    Hour hour1 = new Hour(15, new Day(29, MonthConstants.MARCH, 2002));
    Hour hour2 = new Hour(15, new Day(29, MonthConstants.MARCH, 2002));
    assertTrue(hour1.equals(hour2));
}