Home | History | Annotate | Download | only in unicode

Lines Matching defs:Collator

40 * 11/02/99     helena      Collator performance enhancements.  Eliminates the
82 * The <code>Collator</code> class performs locale-sensitive string
92 * <code>Collator</code> is an abstract base class. Subclasses implement
100 * <code>Collator</code> object for a given locale. You will only need to
101 * look at the subclasses of <code>Collator</code> if you need to
106 * <code>Collator</code> for the default locale.
112 * Collator* myCollator = Collator::createInstance(success);
121 * You can set a <code>Collator</code>'s <em>strength</em> property to
133 * //Get the Collator for US English and set its strength to PRIMARY
135 * Collator* usCollator = Collator::createInstance(Locale::US, success);
136 * usCollator->setStrength(Collator::PRIMARY);
162 * <strong>Note:</strong> <code>Collator</code>s with different Locale,
177 class U_I18N_API Collator : public UObject {
180 // Collator public enums -----------------------------------------------
185 * Use this to set the strength of a Collator object.<br>
190 * differences. Use this to set the strength of a Collator object.<br>
195 * comparison differences. Use this to set the strength of a Collator
204 * generated from Collator objects.
223 * @see Collator#compare
233 // Collator public destructor -----------------------------------------
239 virtual ~Collator();
241 // Collator public methods --------------------------------------------
245 * @param other Collator object to be compared
249 virtual UBool operator==(const Collator& other) const;
253 * @param other Collator object to be compared
257 virtual UBool operator!=(const Collator& other) const;
264 virtual Collator* clone(void) const = 0;
267 * Creates the Collator object for the current default locale.
285 static Collator* U_EXPORT2 createInstance(UErrorCode& err);
302 * @param loc The locale ID for which to open a collator.
310 static Collator* U_EXPORT2 createInstance(const Locale& loc, UErrorCode& err);
314 * Create a Collator with a specific version.
318 * This is designed to be used to open the same collator for a given
326 * @param loc The locale ID for which to open a collator.
327 * @param version The requested collator version.
330 * @return A pointer to a Collator, or 0 if an error occurred
331 * or a collator with the requested version is not available.
336 static Collator *createInstance(const Locale &loc, UVersionInfo version, UErrorCode &err);
443 * Compares two strings using the Collator.
458 * Compares two UTF-8 strings using the Collator.
520 * Gets the locale of the Collator
526 * @return locale where the collation data lives. If the collator
539 * @see Collator#compare
551 * @see Collator#compare
563 * @see Collator#compare
575 * @see Collator#setStrength
586 * Collator*myCollation = Collator::createInstance(Locale::US, status);
588 * myCollation->setStrength(Collator::PRIMARY);
591 * Collator::ComparisonResult result = myCollation->compare("abc", "ABC");
594 * @see Collator#getStrength
722 * Register a new Collator. The collator will be adopted.
723 * @param toAdopt the Collator instance to be adopted
724 collator will be associated
726 * @return a registry key that can be used to unregister this collator
729 static URegistryKey U_EXPORT2 registerInstance(Collator* toAdopt, const Locale& locale, UErrorCode& status);
735 * @return a registry key that can be used to unregister this collator
741 * Unregister a previously-registered Collator or CollatorFactory
747 * @return TRUE if the collator for the key was successfully unregistered
754 * Gets the version information for a Collator.
827 * Gets the variable top value of a Collator.
836 * tailored in this collator.
851 virtual Collator* safeClone(void) = 0;
935 // Collator protected constructors -------------------------------------
939 * Constructor is different from the old default Collator constructor.
944 Collator();
957 Collator(UCollationStrength collationStrength,
962 * @param other Collator object to be copied from
965 Collator(const Collator& other);
967 // Collator protected methods -----------------------------------------
992 Collator& operator=(const Collator& other);
998 static Collator* makeInstance(const Locale& desiredLocale,
1001 // Collator private data members ---------------------------------------
1021 * If standard locale display names are sufficient, Collator instances can
1048 * Return a collator for the provided locale. If the locale
1050 * @param loc the locale identifying the collator to be created.
1051 * @return a new collator if the locale is supported, otherwise NULL.
1054 virtual Collator* createCollator(const Locale& loc) = 0;
1057 * Return the name of the collator for the objectLocale, localized for the displayLocale.
1060 * @param objectLocale the locale identifying the collator
1061 * @param displayLocale the locale for which the display name of the collator should be localized
1083 // Collator inline methods -----------------------------------------------