@Test public void testHashCode() { int result = periodDuration1.hashCode(); assertFalse(periodDuration2.hashCode() == result); }
@Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.days != null ? this.days.hashCode() : 0); hash = 37 * hash + (this.hours != null ? this.hours.hashCode() : 0); hash = 37 * hash + (this.minutes != null ? this.minutes.hashCode() : 0); hash = 37 * hash + (this.months != null ? this.months.hashCode() : 0); hash = 37 * hash + (this.seconds != null ? this.seconds.hashCode() : 0); hash = 37 * hash + (this.years != null ? this.years.hashCode() : 0); return hash; }
DefaultPeriodDuration extends DefaultDuration implements PeriodDuration { @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.days != null ? this.days.hashCode() : 0); hash = 37 * hash + (this.hours != null ? this.hours.hashCode() : 0); hash = 37 * hash + (this.minutes != null ? this.minutes.hashCode() : 0); hash = 37 * hash + (this.months != null ? this.months.hashCode() : 0); hash = 37 * hash + (this.seconds != null ? this.seconds.hashCode() : 0); hash = 37 * hash + (this.years != null ? this.years.hashCode() : 0); return hash; } }
DefaultPeriodDuration extends DefaultDuration implements PeriodDuration { @Override public int hashCode() { int hash = 5; hash = 37 * hash + (this.days != null ? this.days.hashCode() : 0); hash = 37 * hash + (this.hours != null ? this.hours.hashCode() : 0); hash = 37 * hash + (this.minutes != null ? this.minutes.hashCode() : 0); hash = 37 * hash + (this.months != null ? this.months.hashCode() : 0); hash = 37 * hash + (this.seconds != null ? this.seconds.hashCode() : 0); hash = 37 * hash + (this.years != null ? this.years.hashCode() : 0); return hash; } 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 int hashCode() { int hash = 5; hash = 37 * hash + (this.days != null ? this.days.hashCode() : 0); hash = 37 * hash + (this.hours != null ? this.hours.hashCode() : 0); hash = 37 * hash + (this.minutes != null ? this.minutes.hashCode() : 0); hash = 37 * hash + (this.months != null ? this.months.hashCode() : 0); hash = 37 * hash + (this.seconds != null ? this.seconds.hashCode() : 0); hash = 37 * hash + (this.years != null ? this.years.hashCode() : 0); return hash; } 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 int hashCode() { int hash = 5; hash = 37 * hash + (this.days != null ? this.days.hashCode() : 0); hash = 37 * hash + (this.hours != null ? this.hours.hashCode() : 0); hash = 37 * hash + (this.minutes != null ? this.minutes.hashCode() : 0); hash = 37 * hash + (this.months != null ? this.months.hashCode() : 0); hash = 37 * hash + (this.seconds != null ? this.seconds.hashCode() : 0); hash = 37 * hash + (this.years != null ? this.years.hashCode() : 0); return hash; } 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();  }