|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.text.CurrencyPluralInfo
public class CurrencyPluralInfo
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.
Constructor Summary | |
---|---|
CurrencyPluralInfo()
Create a CurrencyPluralInfo object for the default locale. |
|
CurrencyPluralInfo(Locale locale)
Create a CurrencyPluralInfo object for the given locale. |
|
CurrencyPluralInfo(ULocale locale)
Create a CurrencyPluralInfo object for the given locale. |
Method Summary | |
---|---|
Object |
clone()
Standard override |
boolean |
equals(Object a)
Override equals |
String |
getCurrencyPluralPattern(String pluralCount)
Given a plural count, gets currency plural pattern of this locale, used for currency plural format |
static CurrencyPluralInfo |
getInstance()
Gets a CurrencyPluralInfo instance for the default locale. |
static CurrencyPluralInfo |
getInstance(Locale locale)
Gets a CurrencyPluralInfo instance for the given locale. |
static CurrencyPluralInfo |
getInstance(ULocale locale)
Gets a CurrencyPluralInfo instance for the given locale. |
ULocale |
getLocale()
Get locale |
PluralRules |
getPluralRules()
Gets plural rules of this locale, used for currency plural format |
void |
setCurrencyPluralPattern(String pluralCount,
String pattern)
Set currency plural patterns. |
void |
setLocale(ULocale loc)
Set locale. |
void |
setPluralRules(String ruleDescription)
Set plural rules. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CurrencyPluralInfo()
public CurrencyPluralInfo(Locale locale)
locale
- the localepublic CurrencyPluralInfo(ULocale locale)
locale
- the localeMethod Detail |
---|
public static CurrencyPluralInfo getInstance()
public static CurrencyPluralInfo getInstance(Locale locale)
locale
- the locale.
public static CurrencyPluralInfo getInstance(ULocale locale)
locale
- the locale.
public PluralRules getPluralRules()
public String getCurrencyPluralPattern(String pluralCount)
pluralCount
- currency plural count
public ULocale getLocale()
public void setPluralRules(String ruleDescription)
ruleDescription
- new plural rule descriptionpublic void setCurrencyPluralPattern(String pluralCount, String pattern)
pluralCount
- the plural count for which the currency pattern will
be overridden.pattern
- the new currency plural patternpublic void setLocale(ULocale loc)
loc
- the new locale to setpublic Object clone()
clone
in class Object
public boolean equals(Object a)
equals
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |