Lines Matching defs:Collator

40 * 11/02/99     helena      Collator performance enhancements.  Eliminates the
83 * The <code>Collator</code> class performs locale-sensitive string
88 * <code>Collator</code> is an abstract base class. Subclasses implement
96 * <code>Collator</code> object for a given locale. You will only need to
97 * look at the subclasses of <code>Collator</code> if you need to
102 * <code>Collator</code> for the default locale.
108 * Collator* myCollator = Collator::createInstance(success);
117 * You can set a <code>Collator</code>'s <em>strength</em> attribute to
129 * //Get the Collator for US English and set its strength to PRIMARY
131 * Collator* usCollator = Collator::createInstance(Locale::getUS(), success);
132 * usCollator->setStrength(Collator::PRIMARY);
148 * <strong>Note:</strong> <code>Collator</code>s with different Locale,
163 class U_I18N_API Collator : public UObject {
166 // Collator public enums -----------------------------------------------
171 * Use this to set the strength of a Collator object.<br>
176 * differences. Use this to set the strength of a Collator object.<br>
181 * comparison differences. Use this to set the strength of a Collator
190 * generated from Collator objects.
209 * @see Collator#compare
219 // Collator public destructor -----------------------------------------
225 virtual ~Collator();
227 // Collator public methods --------------------------------------------
238 * if (!Collator::operator==(other)) { return FALSE; } // not the same class
243 * @param other Collator object to be compared
247 virtual UBool operator==(const Collator& other) const;
251 * Calls ! operator==(const Collator&) const which works for all subclasses.
252 * @param other Collator object to be compared
256 virtual UBool operator!=(const Collator& other) const;
263 virtual Collator* clone(void) const = 0;
266 * Creates the Collator object for the current default locale.
284 static Collator* U_EXPORT2 createInstance(UErrorCode& err);
319 static Collator* U_EXPORT2 createInstance(const Locale& loc, UErrorCode& err);
394 * . Collator *myCollation =
395 * . Collator::createInstance(Locale::getUS(), status);
397 * . myCollation->setStrength(Collator::PRIMARY);
398 * . // result would be Collator::EQUAL ("abc" == "ABC")
400 * . Collator::EComparisonResult result =
402 * . myCollation->setStrength(Collator::TERTIARY);
403 * . // result would be Collator::LESS ("abc" &lt;&lt;&lt; "ABC")
443 * Compares two strings using the Collator.
458 * Compares two UTF-8 strings using the Collator.
526 * Gets the locale of the Collator
545 * @see Collator#compare
557 * @see Collator#compare
569 * @see Collator#compare
581 * @see Collator#setStrength
592 * Collator*myCollation = Collator::createInstance(Locale::getUS(), status);
594 * myCollation->setStrength(Collator::PRIMARY);
597 * Collator::ComparisonResult result = myCollation->compare("abc", "ABC");
600 * @see Collator#getStrength
615 * @see Collator#getEquivalentReorderCodes
616 * @see Collator#setReorderCodes
634 * @see Collator#getReorderCodes
635 * @see Collator#getEquivalentReorderCodes
658 * @see Collator#getReorderCodes
659 * @see Collator#setReorderCodes
791 * Register a new Collator. The collator will be adopted.
794 * Collator::createInstance to avoid undefined behavior.
795 * @param toAdopt the Collator instance to be adopted
801 static URegistryKey U_EXPORT2 registerInstance(Collator* toAdopt, const Locale& locale, UErrorCode& status);
807 * Collator::createInstance to avoid undefined behavior.
816 * Unregister a previously-registered Collator or CollatorFactory
822 * Collator::createInstance to avoid undefined behavior.
832 * Gets the version information for a Collator.
890 virtual Collator &setMaxVariable(UColReorderCode group, UErrorCode &errorCode);
951 * Gets the variable top value of a Collator.
977 virtual Collator* safeClone(void) const;
1069 // Collator protected constructors -------------------------------------
1073 * Constructor is different from the old default Collator constructor.
1078 Collator();
1092 Collator(UCollationStrength collationStrength,
1098 * @param other Collator object to be copied from
1101 Collator(const Collator& other);
1119 * http://userguide.icu-project.org/collation/concepts#TOC-Collator-naming-scheme
1161 static inline Collator *fromUCollator(UCollator *uc) {
1162 return reinterpret_cast<Collator *>(uc);
1165 static inline const Collator *fromUCollator(const UCollator *uc) {
1166 return reinterpret_cast<const Collator *>(uc);
1182 Collator& operator=(const Collator& other);
1188 static Collator* makeInstance(const Locale& desiredLocale,
1201 * If standard locale display names are sufficient, Collator instances can
1234 virtual Collator* createCollator(const Locale& loc) = 0;
1263 // Collator inline methods -----------------------------------------------