/** * Compares the specified object with this simple date format and indicates * if they are equal. In order to be equal, {@code object} must be an * instance of {@code SimpleDateFormat} and have the same {@code DateFormat} * properties, pattern, {@code DateFormatSymbols} and creation year. * * @param object * the object to compare with this object. * @return {@code true} if the specified object is equal to this simple date * format; {@code false} otherwise. * @see #hashCode */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SimpleDateFormat)) { return false; } SimpleDateFormat simple = (SimpleDateFormat) object; return super.equals(object) && pattern.equals(simple.pattern) && formatData.equals(simple.formatData); }
/** * Overrides equals. * @stable ICU 2.0 */ public boolean equals(Object obj) { try { return dfs.equals(((DateFormatSymbols)obj).dfs); } catch (Exception e) { return false; } }
/** * Overrides equals. * @stable ICU 2.0 */ public boolean equals(Object obj) { try { return dfs.equals(((DateFormatSymbols)obj).dfs); } catch (Exception e) { return false; } }
/** * Compares the given object with this <code>SimpleDateFormat</code> for * equality. * * @return true if the given object is equal to this * <code>SimpleDateFormat</code> */ public boolean equals(Object obj) { if (!super.equals(obj)) return false; // super does class check SimpleDateFormat that = (SimpleDateFormat) obj; return (pattern.equals(that.pattern) && formatData.equals(that.formatData)); }
/** * Compares the given object with this <code>SimpleDateFormat</code> for * equality. * * @return true if the given object is equal to this * <code>SimpleDateFormat</code> */ public boolean equals(Object obj) { if (!super.equals(obj)) return false; // super does class check SimpleDateFormat that = (SimpleDateFormat) obj; return (pattern.equals(that.pattern) && formatData.equals(that.formatData)); }
/** * Compares the specified object with this simple date format and indicates * if they are equal. In order to be equal, {@code object} must be an * instance of {@code SimpleDateFormat} and have the same {@code DateFormat} * properties, pattern, {@code DateFormatSymbols} and creation year. * * @param object * the object to compare with this object. * @return {@code true} if the specified object is equal to this simple date * format; {@code false} otherwise. * @see #hashCode */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SimpleDateFormat)) { return false; } SimpleDateFormat simple = (SimpleDateFormat) object; return super.equals(object) && pattern.equals(simple.pattern) && formatData.equals(simple.formatData); }
/** * Compares the specified object with this simple date format and indicates * if they are equal. In order to be equal, {@code object} must be an * instance of {@code SimpleDateFormat} and have the same {@code DateFormat} * properties, pattern, {@code DateFormatSymbols} and creation year. * * @param object * the object to compare with this object. * @return {@code true} if the specified object is equal to this simple date * format; {@code false} otherwise. * @see #hashCode */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SimpleDateFormat)) { return false; } SimpleDateFormat simple = (SimpleDateFormat) object; return super.equals(object) && pattern.equals(simple.pattern) && formatData.equals(simple.formatData); }
/** * Compares the specified object with this simple date format and indicates * if they are equal. In order to be equal, {@code object} must be an * instance of {@code SimpleDateFormat} and have the same {@code DateFormat} * properties, pattern, {@code DateFormatSymbols} and creation year. * * @param object * the object to compare with this object. * @return {@code true} if the specified object is equal to this simple date * format; {@code false} otherwise. * @see #hashCode */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SimpleDateFormat)) { return false; } SimpleDateFormat simple = (SimpleDateFormat) object; return super.equals(object) && pattern.equals(simple.pattern) && formatData.equals(simple.formatData); }
/** * Compares the specified object with this simple date format and indicates * if they are equal. In order to be equal, {@code object} must be an * instance of {@code SimpleDateFormat} and have the same {@code DateFormat} * properties, pattern, {@code DateFormatSymbols} and creation year. * * @param object * the object to compare with this object. * @return {@code true} if the specified object is equal to this simple date * format; {@code false} otherwise. * @see #hashCode */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SimpleDateFormat)) { return false; } SimpleDateFormat simple = (SimpleDateFormat) object; return super.equals(object) && pattern.equals(simple.pattern) && formatData.equals(simple.formatData); }
/** * Compares the specified object with this simple date format and indicates * if they are equal. In order to be equal, {@code object} must be an * instance of {@code SimpleDateFormat} and have the same {@code DateFormat} * properties, pattern, {@code DateFormatSymbols} and creation year. * * @param object * the object to compare with this object. * @return {@code true} if the specified object is equal to this simple date * format; {@code false} otherwise. * @see #hashCode */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SimpleDateFormat)) { return false; } SimpleDateFormat simple = (SimpleDateFormat) object; return super.equals(object) && pattern.equals(simple.pattern) && formatData.equals(simple.formatData); }
/** * Compares the specified object with this simple date format and indicates * if they are equal. In order to be equal, {@code object} must be an * instance of {@code SimpleDateFormat} and have the same {@code DateFormat} * properties, pattern, {@code DateFormatSymbols} and creation year. * * @param object * the object to compare with this object. * @return {@code true} if the specified object is equal to this simple date * format; {@code false} otherwise. * @see #hashCode */ @Override public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SimpleDateFormat)) { return false; } SimpleDateFormat simple = (SimpleDateFormat) object; return super.equals(object) && pattern.equals(simple.pattern) && formatData.equals(simple.formatData); }