Compares the specified object to this SimpleTimeZone and returns whether they are equal. The object must be an instance of SimpleTimeZone and have the same internal data. @param object the object to compare with this object. @return true if the specified object is
(Object object)
| 367 | * @see #hashCode |
| 368 | */ |
| 369 | @Override |
| 370 | public boolean equals(Object object) { |
| 371 | if (!(object instanceof SimpleTimeZone)) { |
| 372 | return false; |
| 373 | } |
| 374 | SimpleTimeZone tz = (SimpleTimeZone) object; |
| 375 | return getID().equals(tz.getID()) |
| 376 | && rawOffset == tz.rawOffset |
| 377 | && useDaylight == tz.useDaylight |
| 378 | && (!useDaylight || (startYear == tz.startYear |
| 379 | && startMonth == tz.startMonth |
| 380 | && startDay == tz.startDay && startMode == tz.startMode |
| 381 | && startDayOfWeek == tz.startDayOfWeek |
| 382 | && startTime == tz.startTime && endMonth == tz.endMonth |
| 383 | && endDay == tz.endDay |
| 384 | && endDayOfWeek == tz.endDayOfWeek |
| 385 | && endTime == tz.endTime && endMode == tz.endMode && dstSavings == tz.dstSavings)); |
| 386 | } |
| 387 | |
| 388 | @Override |
| 389 | public int getDSTSavings() { |