ICU-5787 Added operator!= .

X-SVN-Rev: 22313
This commit is contained in:
Claire Ho 2007-08-08 01:07:23 +00:00
parent 0de5cefde3
commit c9f5e38fb9
3 changed files with 16 additions and 2 deletions

View File

@ -219,6 +219,11 @@ DateTimePatternGenerator::operator==(const DateTimePatternGenerator& other) cons
}
}
UBool
DateTimePatternGenerator::operator!=(const DateTimePatternGenerator& other) const {
return !operator==(other);
}
DateTimePatternGenerator::~DateTimePatternGenerator() {
if (fAvailableFormatKeyHash!=NULL) {
delete fAvailableFormatKeyHash;

View File

@ -86,6 +86,15 @@ public:
* @draft ICU 3.8
*/
UBool operator==(const DateTimePatternGenerator& other) const;
/**
* Return true if another object is semantically unequal to this one.
*
* @param other the DateTimePatternGenerator object to be compared with.
* @return true if other is semantically unequal to this.
* @draft ICU 3.8
*/
UBool operator!=(const DateTimePatternGenerator& other) const;
/**
* Utility to return a unique skeleton from a given pattern. For example,

View File

@ -162,11 +162,11 @@ void IntlTestDateTimePatternGeneratorAPI::testAPI(/*char *par*/)
if ( !(*cloneDTPatternGen == *instFromLocale) ) {
errln("ERROR: inconsistency is found in cloned object.");
}
/*
if ( *cloneDTPatternGen != *instFromLocale ) {
errln("ERROR: inconsistency is found in cloned object.");
}
*/
delete instFromLocale;
delete cloneDTPatternGen;