Logo Search packages:      
Sourcecode: icu version File versions

UBool TimeArrayTimeZoneRule::operator== ( const TimeZoneRule that  )  const [virtual]

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

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

Reimplemented from TimeZoneRule.

Definition at line 447 of file tzrule.cpp.

References FALSE, fNumStartTimes, fStartTimes, fTimeRuleType, UObject::getDynamicClassID(), getDynamicClassID(), TimeZoneRule::operator==(), and TRUE.

Referenced by operator!=().

                                                                {
    if (this == &that) {
        return TRUE;
    }
    if (getDynamicClassID() != that.getDynamicClassID()
        || TimeZoneRule::operator==(that) == FALSE) {
        return FALSE;
    }
    TimeArrayTimeZoneRule *tatzr = (TimeArrayTimeZoneRule*)&that;
    if (fTimeRuleType != tatzr->fTimeRuleType ||
        fNumStartTimes != tatzr->fNumStartTimes) {
        return FALSE;
    }
    // Compare start times
    UBool res = TRUE;
    for (int32_t i = 0; i < fNumStartTimes; i++) {
        if (fStartTimes[i] != tatzr->fStartTimes[i]) {
            res = FALSE;
            break;
        }
    }
    return res;
}


Generated by  Doxygen 1.6.0   Back to index