Logo Search packages:      
Sourcecode: icu version File versions

UBool AnnualTimeZoneRule::isEquivalentTo ( const TimeZoneRule that  )  const [virtual]

Returns if this rule represents the same rule and offsets as another. When two TimeZoneRule objects differ only its names, this method returns true.

Parameters:
that The TimeZoneRule object to be compared with.
Returns:
true if the other TimeZoneRule is equivalent to this one. ICU 3.8

Reimplemented from TimeZoneRule.

Definition at line 319 of file tzrule.cpp.

References FALSE, fDateTimeRule, fEndYear, fStartYear, UObject::getDynamicClassID(), getDynamicClassID(), TimeZoneRule::isEquivalentTo(), and TRUE.

                                                                  {
    if (this == &other) {
        return TRUE;
    }
    if (getDynamicClassID() != other.getDynamicClassID() ||
        TimeZoneRule::isEquivalentTo(other) == FALSE) {
        return FALSE;
    }
    AnnualTimeZoneRule* that = (AnnualTimeZoneRule*)&other;
    return (*fDateTimeRule == *(that->fDateTimeRule) &&
            fStartYear == that->fStartYear &&
            fEndYear == that->fEndYear);
}


Generated by  Doxygen 1.6.0   Back to index