@Test public void testEquals() { assertFalse(periodDuration1.equals(null)); assertEquals(periodDuration1, periodDuration1); assertFalse(periodDuration1.equals(periodDuration2)); }
@Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultPeriodDuration) { final DefaultPeriodDuration that = (DefaultPeriodDuration) object; return Utilities.equals(this.days, that.days) && Utilities.equals(this.hours, that.hours) && Utilities.equals(this.minutes, that.minutes) && Utilities.equals(this.months, that.months) && Utilities.equals(this.seconds, that.seconds) && Utilities.equals(this.years, that.years); } return false; }
DefaultPeriodDuration extends DefaultDuration implements PeriodDuration { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultPeriodDuration) { final DefaultPeriodDuration that = (DefaultPeriodDuration) object; return Utilities.equals(this.days, that.days) && Utilities.equals(this.hours, that.hours) && Utilities.equals(this.minutes, that.minutes) && Utilities.equals(this.months, that.months) && Utilities.equals(this.seconds, that.seconds) && Utilities.equals(this.years, that.years); } return false; } }
DefaultPeriodDuration extends DefaultDuration implements PeriodDuration { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultPeriodDuration) { final DefaultPeriodDuration that = (DefaultPeriodDuration) object; return Utilities.equals(this.days, that.days) && Utilities.equals(this.hours, that.hours) && Utilities.equals(this.minutes, that.minutes) && Utilities.equals(this.months, that.months) && Utilities.equals(this.seconds, that.seconds) && Utilities.equals(this.years, that.years); } return false; } DefaultPeriodDuration(InternationalString years, InternationalString months, InternationalString week, InternationalString days,
            InternationalString hours, InternationalString minutes, InternationalString seconds);  DefaultPeriodDuration(long durationInMilliSeconds); }
DefaultPeriodDuration extends DefaultDuration implements PeriodDuration { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultPeriodDuration) { final DefaultPeriodDuration that = (DefaultPeriodDuration) object; return Utilities.equals(this.days, that.days) && Utilities.equals(this.hours, that.hours) && Utilities.equals(this.minutes, that.minutes) && Utilities.equals(this.months, that.months) && Utilities.equals(this.seconds, that.seconds) && Utilities.equals(this.years, that.years); } return false; } DefaultPeriodDuration(InternationalString years, InternationalString months, InternationalString week, InternationalString days,
            InternationalString hours, InternationalString minutes, InternationalString seconds);  DefaultPeriodDuration(long durationInMilliSeconds); InternationalString getDesignator(); InternationalString getYears(); InternationalString getMonths(); InternationalString getDays(); InternationalString getTimeIndicator(); InternationalString getHours(); InternationalString getMinutes(); InternationalString getSeconds(); void setYears(InternationalString years); void setMonths(InternationalString months); void setDays(InternationalString days); void setHours(InternationalString hours); void setMinutes(InternationalString minutes); void setSeconds(InternationalString seconds); InternationalString getWeek(); void setWeek(InternationalString week); long getTimeInMillis(); @Override boolean equals(final Object object); @Override int hashCode(); @Override /** * Returns a duration value String in format 8601. the pattern is PnYnMnDTnHnMnS. */ String toString(); }
DefaultPeriodDuration extends DefaultDuration implements PeriodDuration { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (object instanceof DefaultPeriodDuration) { final DefaultPeriodDuration that = (DefaultPeriodDuration) object; return Utilities.equals(this.days, that.days) && Utilities.equals(this.hours, that.hours) && Utilities.equals(this.minutes, that.minutes) && Utilities.equals(this.months, that.months) && Utilities.equals(this.seconds, that.seconds) && Utilities.equals(this.years, that.years); } return false; } DefaultPeriodDuration(InternationalString years, InternationalString months, InternationalString week, InternationalString days,
            InternationalString hours, InternationalString minutes, InternationalString seconds);  DefaultPeriodDuration(long durationInMilliSeconds); InternationalString getDesignator(); InternationalString getYears(); InternationalString getMonths(); InternationalString getDays(); InternationalString getTimeIndicator(); InternationalString getHours(); InternationalString getMinutes(); InternationalString getSeconds(); void setYears(InternationalString years); void setMonths(InternationalString months); void setDays(InternationalString days); void setHours(InternationalString hours); void setMinutes(InternationalString minutes); void setSeconds(InternationalString seconds); InternationalString getWeek(); void setWeek(InternationalString week); long getTimeInMillis(); @Override boolean equals(final Object object); @Override int hashCode(); @Override /** * Returns a duration value String in format 8601. the pattern is PnYnMnDTnHnMnS. */ String toString();  }