@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)); assertEquals(hour1, hour2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Hour)) { return false; } Hour that = (Hour) obj; if (this.hour != that.hour) { return false; } if (!this.day.equals(that.day)) { return false; } return true; }
Hour extends RegularTimePeriod implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Hour)) { return false; } Hour that = (Hour) obj; if (this.hour != that.hour) { return false; } if (!this.day.equals(that.day)) { return false; } return true; } }
Hour extends RegularTimePeriod implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Hour)) { return false; } Hour that = (Hour) obj; if (this.hour != that.hour) { return false; } if (!this.day.equals(that.day)) { return false; } return true; } Hour();  Hour(int hour, Day day);  Hour(int hour, int day, int month, int year);  Hour(Date time);  Hour(Date time, TimeZone zone, Locale locale); }
Hour extends RegularTimePeriod implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Hour)) { return false; } Hour that = (Hour) obj; if (this.hour != that.hour) { return false; } if (!this.day.equals(that.day)) { return false; } return true; } Hour();  Hour(int hour, Day day);  Hour(int hour, int day, int month, int year);  Hour(Date time);  Hour(Date time, TimeZone zone, Locale locale); int getHour(); Day getDay(); int getYear(); int getMonth(); int getDayOfMonth(); @Override long getFirstMillisecond(); @Override long getLastMillisecond(); @Override void peg(Calendar calendar); @Override RegularTimePeriod previous(); @Override RegularTimePeriod next(); @Override long getSerialIndex(); @Override long getFirstMillisecond(Calendar calendar); @Override long getLastMillisecond(Calendar calendar); @Override boolean equals(Object obj); @Override String toString(); @Override int hashCode(); @Override int compareTo(TimePeriod o1); static Hour parseHour(String s); }
Hour extends RegularTimePeriod implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Hour)) { return false; } Hour that = (Hour) obj; if (this.hour != that.hour) { return false; } if (!this.day.equals(that.day)) { return false; } return true; } Hour();  Hour(int hour, Day day);  Hour(int hour, int day, int month, int year);  Hour(Date time);  Hour(Date time, TimeZone zone, Locale locale); int getHour(); Day getDay(); int getYear(); int getMonth(); int getDayOfMonth(); @Override long getFirstMillisecond(); @Override long getLastMillisecond(); @Override void peg(Calendar calendar); @Override RegularTimePeriod previous(); @Override RegularTimePeriod next(); @Override long getSerialIndex(); @Override long getFirstMillisecond(Calendar calendar); @Override long getLastMillisecond(Calendar calendar); @Override boolean equals(Object obj); @Override String toString(); @Override int hashCode(); @Override int compareTo(TimePeriod o1); static Hour parseHour(String s); static final int FIRST_HOUR_IN_DAY; static final int LAST_HOUR_IN_DAY; }