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

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

Introduction

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

/**
 * Test that a Second instance is equal to itself.
 *
 * SourceForge Bug ID: 558850.//w w  w  . ja va2 s . c o  m
 */
@Test
public void testEqualsSelf() {
    Second second = new Second();
    assertTrue(second.equals(second));
}

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

/**
 * Test that a Second instance is equal to itself.
 *
 * SourceForge Bug ID: 558850./*from  w  w  w . j  a  va  2  s.com*/
 */
public void testEqualsSelf() {
    Second second = new Second();
    assertTrue(second.equals(second));
}

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *//*from  w  ww.jav a 2s.  co m*/
@Test
public void testHashcode() {
    Second s1 = new Second(13, 45, 5, 1, 2, 2003);
    Second s2 = new Second(13, 45, 5, 1, 2, 2003);
    assertTrue(s1.equals(s2));
    int h1 = s1.hashCode();
    int h2 = s2.hashCode();
    assertEquals(h1, h2);
}

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

/**
 * Two objects that are equal are required to return the same hashCode.
 *///from  w ww. ja v a  2 s  . co m
public void testHashcode() {
    Second s1 = new Second(13, 45, 5, 1, 2, 2003);
    Second s2 = new Second(13, 45, 5, 1, 2, 2003);
    assertTrue(s1.equals(s2));
    int h1 = s1.hashCode();
    int h2 = s2.hashCode();
    assertEquals(h1, h2);
}

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

/**
 * Tests the equals method./*from w w  w . jav  a 2 s . c  o m*/
 */
@Test
public void testEquals() {
    Day day1 = new Day(29, MonthConstants.MARCH, 2002);
    Hour hour1 = new Hour(15, day1);
    Minute minute1 = new Minute(15, hour1);
    Second second1 = new Second(34, minute1);
    Day day2 = new Day(29, MonthConstants.MARCH, 2002);
    Hour hour2 = new Hour(15, day2);
    Minute minute2 = new Minute(15, hour2);
    Second second2 = new Second(34, minute2);
    assertTrue(second1.equals(second2));
}

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

/**
 * Tests the equals method.//from ww w.  ja va 2  s .c o  m
 */
public void testEquals() {
    Day day1 = new Day(29, MonthConstants.MARCH, 2002);
    Hour hour1 = new Hour(15, day1);
    Minute minute1 = new Minute(15, hour1);
    Second second1 = new Second(34, minute1);
    Day day2 = new Day(29, MonthConstants.MARCH, 2002);
    Hour hour2 = new Hour(15, day2);
    Minute minute2 = new Minute(15, hour2);
    Second second2 = new Second(34, minute2);
    assertTrue(second1.equals(second2));
}