UBool TimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const { return ((this == &other) || (getDynamicClassID() == other.getDynamicClassID() && fRawOffset == other.fRawOffset && fDSTSavings == other.fDSTSavings)); }
UBool TimeZoneRule::operator==(const TimeZoneRule& that) const { return ((this == &that) || (getDynamicClassID() == that.getDynamicClassID() && fName == that.fName && fRawOffset == that.fRawOffset && fDSTSavings == that.fDSTSavings)); }
UBool Calendar::isEquivalentTo(const Calendar& other) const { return getDynamicClassID() == other.getDynamicClassID() && fLenient == other.fLenient && fFirstDayOfWeek == other.fFirstDayOfWeek && fMinimalDaysInFirstWeek == other.fMinimalDaysInFirstWeek && *fZone == *other.fZone; }
UBool InitialTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const { if (this == &other) { return TRUE; } if (getDynamicClassID() != other.getDynamicClassID() || TimeZoneRule::isEquivalentTo(other) == FALSE) { return FALSE; } return TRUE; }
UBool DateTimeRule::operator==(const DateTimeRule& that) const { return ((this == &that) || (getDynamicClassID() == that.getDynamicClassID() && fMonth == that.fMonth && fDayOfMonth == that.fDayOfMonth && fDayOfWeek == that.fDayOfWeek && fWeekInMonth == that.fWeekInMonth && fMillisInDay == that.fMillisInDay && fDateRuleType == that.fDateRuleType && fTimeRuleType == that.fTimeRuleType)); }
UBool AnnualTimeZoneRule::operator==(const TimeZoneRule& that) const { if (this == &that) { return TRUE; } if (getDynamicClassID() != that.getDynamicClassID()) { return FALSE; } AnnualTimeZoneRule *atzr = (AnnualTimeZoneRule*)&that; return (*fDateTimeRule == *(atzr->fDateTimeRule) && fStartYear == atzr->fStartYear && fEndYear == atzr->fEndYear); }
UBool AnnualTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const { 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); }
/** * Compares two substitutions for equality * @param The substitution to compare this one to * @return true if the two substitutions are functionally equivalent */ UBool NFSubstitution::operator==(const NFSubstitution& rhs) const { // compare class and all of the fields all substitutions have // in common // this should be called by subclasses before their own equality tests return getDynamicClassID() == rhs.getDynamicClassID() && pos == rhs.pos && (ruleSet == NULL) == (rhs.ruleSet == NULL) // && ruleSet == rhs.ruleSet causes circularity, other checks to make instead? && (numberFormat == NULL ? (rhs.numberFormat == NULL) : (*numberFormat == *rhs.numberFormat)); }
UBool NumberFormat::operator==(const Format& that) const { NumberFormat* other = (NumberFormat*)&that; return ((this == &that) || ((Format::operator==(that) && getDynamicClassID()== that.getDynamicClassID() && fMaxIntegerDigits == other->fMaxIntegerDigits && fMinIntegerDigits == other->fMinIntegerDigits && fMaxFractionDigits == other->fMaxFractionDigits && fMinFractionDigits == other->fMinFractionDigits && fGroupingUsed == other->fGroupingUsed && fParseIntegerOnly == other->fParseIntegerOnly))); }
UBool UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const { if (this == &that) { return TRUE; } if (getDynamicClassID() != that.getDynamicClassID()) { return FALSE; } UCharCharacterIterator& realThat = (UCharCharacterIterator&)that; return text == realThat.text && textLength == realThat.textLength && pos == realThat.pos && begin == realThat.begin && end == realThat.end; }
UBool TimeZoneTransition::operator==(const TimeZoneTransition& that) const { if (this == &that) { return TRUE; } if (getDynamicClassID() != that.getDynamicClassID()) { return FALSE; } if (fTime != that.fTime) { return FALSE; } if (fFrom == NULL && that.fFrom == NULL || fFrom != NULL && that.fFrom != NULL && *fFrom == *(that.fFrom)) { if (fTo == NULL && that.fTo == NULL || fTo != NULL && that.fTo != NULL && *fTo == *(that.fTo)) { return TRUE; } } return FALSE; }
UBool RuleBasedCollator::operator==(const Collator& that) const { /* only checks for address equals here */ if (Collator::operator==(that)) return TRUE; if (getDynamicClassID() != that.getDynamicClassID()) return FALSE; /* not the same class */ RuleBasedCollator& thatAlias = (RuleBasedCollator&)that; // weiv: use C function, commented code below is wrong return ucol_equals(this->ucollator, thatAlias.ucollator); /* synwee : orginal code does not check for data compatibility */ /* if (ucollator != thatAlias.ucollator) return FALSE; return TRUE; */ }
UBool TimeArrayTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const { if (this == &other) { return TRUE; } if (getDynamicClassID() != other.getDynamicClassID() || TimeZoneRule::isEquivalentTo(other) == FALSE) { return FALSE; } TimeArrayTimeZoneRule* that = (TimeArrayTimeZoneRule*)&other; if (fTimeRuleType != that->fTimeRuleType || fNumStartTimes != that->fNumStartTimes) { return FALSE; } // Compare start times UBool res = TRUE; for (int32_t i = 0; i < fNumStartTimes; i++) { if (fStartTimes[i] != that->fStartTimes[i]) { res = FALSE; break; } } return res; }
UBool TimeArrayTimeZoneRule::operator==(const TimeZoneRule& that) const { 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; }
UBool InitialTimeZoneRule::operator==(const TimeZoneRule& that) const { return ((this == &that) || (getDynamicClassID() == that.getDynamicClassID() && TimeZoneRule::operator==(that))); }
// dummy implementations of other pure virtual base class functions virtual UBool operator==(const ForwardCharacterIterator &that) const { return this==&that || getDynamicClassID()==that.getDynamicClassID() && pos==((SubCharIter &)that).pos; }
UBool TimeZone::operator==(const TimeZone& that) const { return getDynamicClassID() == that.getDynamicClassID() && fID == that.fID; }
UBool Format::operator==(const Format& that) const { // Subclasses: Call this method and then add more specific checks. return getDynamicClassID() == that.getDynamicClassID(); }