Logo Search packages:      
Sourcecode: icu version File versions

UBool SimpleDateFormat::operator== ( const Format other ) const [virtual]

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

Parameters:
otherthe object to be compared with.
Returns:
true if the given Format objects are semantically equal. ICU 2.0

Reimplemented from DateFormat.

Definition at line 496 of file smpdtfmt.cpp.

References FALSE, fDefaultCenturyStart, fPattern, fSymbols, and NULL.

{
    if (DateFormat::operator==(other)) {
        // DateFormat::operator== guarantees following cast is safe
        SimpleDateFormat* that = (SimpleDateFormat*)&other;
        return (fPattern             == that->fPattern &&
                fSymbols             != NULL && // Check for pathological object
                that->fSymbols       != NULL && // Check for pathological object
                *fSymbols            == *that->fSymbols &&
                fHaveDefaultCentury  == that->fHaveDefaultCentury &&
                fDefaultCenturyStart == that->fDefaultCenturyStart);
    }
    return FALSE;
}

Generated by  Doxygen 1.6.0   Back to index