ICU 76.1 76.1
|
This class represents the information needed by DecimalFormat to format currency plural, such as "3.00 US dollars" or "1.00 US dollar". More...
#include <currpinf.h>
Static Public Member Functions | |
static UClassID | getStaticClassID () |
ICU "poor man's RTTI", returns a UClassID for this class. | |
Friends | |
class | DecimalFormat |
class | DecimalFormatImpl |
This class represents the information needed by DecimalFormat to format currency plural, such as "3.00 US dollars" or "1.00 US dollar".
DecimalFormat creates for itself an instance of CurrencyPluralInfo from its locale data.
If you need to change any of these symbols, you can get the CurrencyPluralInfo object from your DecimalFormat and modify it.
Following are the information needed for currency plural format and parse: locale information, plural rule of the locale, currency plural pattern of the locale.
Definition at line 48 of file currpinf.h.
icu::CurrencyPluralInfo::CurrencyPluralInfo | ( | UErrorCode & | status | ) |
Create a CurrencyPluralInfo object for the default locale.
status | output param set to success/failure code on exit |
icu::CurrencyPluralInfo::CurrencyPluralInfo | ( | const Locale & | locale, |
UErrorCode & | status | ||
) |
Create a CurrencyPluralInfo object for the given locale.
locale | the locale |
status | output param set to success/failure code on exit |
icu::CurrencyPluralInfo::CurrencyPluralInfo | ( | const CurrencyPluralInfo & | info | ) |
Copy constructor.
CurrencyPluralInfo * icu::CurrencyPluralInfo::clone | ( | ) | const |
Clone.
UnicodeString & icu::CurrencyPluralInfo::getCurrencyPluralPattern | ( | const UnicodeString & | pluralCount, |
UnicodeString & | result | ||
) | const |
Given a plural count, gets currency plural pattern of this locale, used for currency plural format.
pluralCount | currency plural count |
result | output param to receive the pattern |
ICU "poor man's RTTI", returns a UClassID for the actual class.
Reimplemented from icu::UObject.
const PluralRules * icu::CurrencyPluralInfo::getPluralRules | ( | ) | const |
Gets plural rules of this locale, used for currency plural format.
ICU "poor man's RTTI", returns a UClassID for this class.
|
inline |
Not equal operator.
Definition at line 263 of file currpinf.h.
References icu::operator==().
CurrencyPluralInfo & icu::CurrencyPluralInfo::operator= | ( | const CurrencyPluralInfo & | info | ) |
Assignment operator.
bool icu::CurrencyPluralInfo::operator== | ( | const CurrencyPluralInfo & | info | ) | const |
Equal operator.
void icu::CurrencyPluralInfo::setCurrencyPluralPattern | ( | const UnicodeString & | pluralCount, |
const UnicodeString & | pattern, | ||
UErrorCode & | status | ||
) |
Set currency plural pattern.
The currency plural pattern is set when CurrencyPluralInfo instance is created. You can call this method to reset currency plural pattern only if you want to modify the default currency plural pattern of the locale.
pluralCount | the plural count for which the currency pattern will be overridden. |
pattern | the new currency plural pattern |
status | output param set to success/failure code on exit |
void icu::CurrencyPluralInfo::setLocale | ( | const Locale & | loc, |
UErrorCode & | status | ||
) |
Set locale.
loc | the new locale to set |
status | output param set to success/failure code on exit |
void icu::CurrencyPluralInfo::setPluralRules | ( | const UnicodeString & | ruleDescription, |
UErrorCode & | status | ||
) |
Set plural rules.
The plural rule is set when CurrencyPluralInfo instance is created. You can call this method to reset plural rules only if you want to modify the default plural rule of the locale.
ruleDescription | new plural rule description |
status | output param set to success/failure code on exit |
|
friend |
Definition at line 197 of file currpinf.h.
Definition at line 198 of file currpinf.h.