Logo Search packages:      
Sourcecode: icu version File versions  Download package

UBool RuleBasedTimeZone::operator== ( const TimeZone that  )  const [virtual]

Return true if the given TimeZone objects are semantically equal. Objects of different subclasses are considered unequal.

Parameters:
that The object to be compared with.
Returns:
true if the given TimeZone objects are semantically equal. ICU 3.8

Reimplemented from TimeZone.

Definition at line 87 of file rbtz.cpp.

References FALSE, fFinalRules, fHistoricRules, fInitialRule, TimeZone::getDynamicClassID(), getDynamicClassID(), TimeZone::operator==(), and TRUE.

Referenced by operator!=().

                                                        {
    if (this == &that) {
        return TRUE;
    }
    if (getDynamicClassID() != that.getDynamicClassID()
        || BasicTimeZone::operator==(that) == FALSE) {
        return FALSE;
    }
    RuleBasedTimeZone *rbtz = (RuleBasedTimeZone*)&that;
    if (*fInitialRule != *(rbtz->fInitialRule)) {
        return FALSE;
    }
    if (compareRules(fHistoricRules, rbtz->fHistoricRules)
        && compareRules(fFinalRules, rbtz->fFinalRules)) {
        return TRUE;
    }
    return FALSE;
}


Generated by  Doxygen 1.6.0   Back to index