/*
*******************************************************************************
-* Copyright (C) 2008, International Business Machines Corporation and
+* Copyright (C) 2008-2010, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* </p>
* <p>
* Syntax:<pre>
+ * \code
* rules = rule (';' rule)*
* rule = keyword ':' condition
* keyword = <identifier>
* value = digit+
* digit = 0|1|2|3|4|5|6|7|8|9
* range = value'..'value
+ * \endcode
* </pre></p>
* <p>
* The difference between 'in' and 'within' is that 'in' only includes
* }
* else if ( ... )
* </pre>
+ * <strong>Note:</strong><br>
+ * <p>
+ * ICU defines plural rules for many locales based on CLDR <i>Language Plural Rules</i>.
+ * For these predefined rules, see CLDR page at
+ * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
+ * </p>
*/
class U_I18N_API PluralRules : public UObject {
public:
* @param status Output param set to success/failure code on exit, which
* must not indicate a failure before the function call.
*
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
PluralRules(UErrorCode& status);
/**
* Copy constructor.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
PluralRules(const PluralRules& other);
/**
* Destructor.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
virtual ~PluralRules();
/**
* Clone
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
PluralRules* clone() const;
/**
* Assignment operator.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
PluralRules& operator=(const PluralRules&);
* @param status Output param set to success/failure code on exit, which
* must not indicate a failure before the function call.
* @return new PluralRules pointer. NULL if there is an error.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
static PluralRules* U_EXPORT2 createRules(const UnicodeString& description,
UErrorCode& status);
* @param status Output param set to success/failure code on exit, which
* must not indicate a failure before the function call.
* @return new PluralRules pointer. NULL if there is an error.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
static PluralRules* U_EXPORT2 createDefaultRules(UErrorCode& status);
* the rules for the closest parent in the locale hierarchy
* that has one will be returned. The final fallback always
* returns the default 'other' rules.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
static PluralRules* U_EXPORT2 forLocale(const Locale& locale, UErrorCode& status);
*
* @param number The number for which the rule has to be determined.
* @return The keyword of the selected rule.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
UnicodeString select(int32_t number) const;
*
* @param number The number for which the rule has to be determined.
* @return The keyword of the selected rule.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
UnicodeString select(double number) const;
* must not indicate a failure before the function call.
* @return StringEnumeration with the keywords.
* The caller must delete the object.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
StringEnumeration* getKeywords(UErrorCode& status) const;
* @param keyword the input keyword.
* @return TRUE if the input keyword is defined.
* Otherwise, return FALSE.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
UBool isKeyword(const UnicodeString& keyword) const;
*
* @return keyword for default plural form.
* @internal 4.0
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
UnicodeString getKeywordOther() const;
* @param other The other PluralRules object to be compared with.
* @return True if the given PluralRules is the same as this
* PluralRules; false otherwise.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
virtual UBool operator==(const PluralRules& other) const;
* @param other The PluralRules object to be compared with.
* @return True if the given PluralRules is not the same as this
* PluralRules; false otherwise.
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
UBool operator!=(const PluralRules& other) const {return !operator==(other);}
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
- * @draft ICU 4.0
+ * @stable ICU 4.0
*
*/
static UClassID U_EXPORT2 getStaticClassID(void);
/**
* ICU "poor man's RTTI", returns a UClassID for the actual class.
*
- * @draft ICU 4.0
+ * @stable ICU 4.0
*/
virtual UClassID getDynamicClassID() const;