|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Currency
public final class Currency
This class represents a currency as identified in the ISO 4217 currency codes.
| Method Summary | |
|---|---|
String |
getCurrencyCode()
Returns this currency's ISO 4217 currency code. |
int |
getDefaultFractionDigits()
Returns the default number of fraction digits for this currency. |
static Currency |
getInstance(Locale locale)
Returns the currency instance for this locale. |
static Currency |
getInstance(String currencyCode)
Returns the currency instance for this currency code. |
String |
getSymbol()
Returns the symbol for this currency in the default locale. |
String |
getSymbol(Locale locale)
Return the symbol for this currency in the given locale. |
String |
toString()
Returns this currency's ISO 4217 currency code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Currency getInstance(String currencyCode)
currencyCode - java.lang.String
IllegalArgumentException - if the currency code is not a supported ISO 4217 currency
codepublic static Currency getInstance(Locale locale)
locale - java.util.Locale
IllegalArgumentException - if the locale's country is not a supported ISO 3166 Countrypublic String getCurrencyCode()
public String getSymbol()
public String getSymbol(Locale locale)
If the locale doesn't have any countries (e.g.
Locale.JAPANESE, new Locale("en","")), currencyCode is
returned.
First the locale bundle is checked, if the locale has the same currency, the CurrencySymbol in this locale bundle is returned.
Then a currency bundle for this locale is searched.
If a currency bundle for this locale does not exist, or there is no
symbol for this currency in this bundle, than currencyCode
is returned.
locale - java.lang.String locale
public int getDefaultFractionDigits()
public String toString()
toString in class Object
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||