@Override public boolean equals(Object obj) { if (obj instanceof NumberFormatICU) { return ((NumberFormatICU)obj).fIcuNfmt.equals(fIcuNfmt); } return false; }
/** * Overrides equals. * @stable ICU 2.0 */ public boolean equals(Object obj) { return super.equals(obj); }
/** * Overrides equals. * @stable ICU 2.0 */ public boolean equals(Object obj) { return super.equals(obj); }
@Override public boolean equals(Object obj) { if (obj == null || !super.equals(obj) || !(obj instanceof DateNumberFormat)) { return false; } DateNumberFormat other = (DateNumberFormat)obj; return (this.maxIntDigits == other.maxIntDigits && this.minIntDigits == other.minIntDigits && this.minusSign == other.minusSign && this.positiveOnly == other.positiveOnly && Arrays.equals(this.digits, other.digits)); }
/** * Overrides equals. * @stable ICU 2.0 */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; DateFormat other = (DateFormat) obj; return (((calendar==null && other.calendar==null) || (calendar!=null && other.calendar!=null && calendar.isEquivalentTo(other.calendar))) && ((numberFormat==null && other.numberFormat==null) || (numberFormat!=null && other.numberFormat!=null && numberFormat.equals(other.numberFormat))) && capitalizationSetting == other.capitalizationSetting); }
/** * Two MeasureFormats, a and b, are equal if and only if they have the same formatWidth, * locale, and equal number formats. * @stable ICU 53 */ @Override public final boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof MeasureFormat)) { return false; } MeasureFormat rhs = (MeasureFormat) other; // A very slow but safe implementation. return getWidth() == rhs.getWidth() && getLocale().equals(rhs.getLocale()) && getNumberFormat().equals(rhs.getNumberFormat()); }
if (obj == null) return false; if (!super.equals(obj)) return false; // super does class check