java.lang.Object | |
↳ | java.util.Currency |
A currency corresponding to an ISO 4217 currency code such as "EUR" or "USD".
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns this currency's ISO 4217 currency code.
| |||||||||||
Returns the default number of fraction digits for this currency.
| |||||||||||
Returns the
Currency instance for this Locale 's country. | |||||||||||
Returns the
Currency instance for the given ISO 4217 currency code. | |||||||||||
Returns the localized currency symbol for this currency in
locale . | |||||||||||
Equivalent to
getSymbol(Locale.getDefault()) . | |||||||||||
Returns this currency's ISO 4217 currency code.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns the default number of fraction digits for this currency. For instance, the default number of fraction digits for the US dollar is 2 because there are 100 US cents in a US dollar. For the Japanese Yen, the number is 0 because coins smaller than 1 Yen became invalid in 1953. In the case of pseudo-currencies, such as IMF Special Drawing Rights, -1 is returned.
Returns the Currency
instance for this Locale
's country.
IllegalArgumentException | if the locale's country is not a supported ISO 3166 country. |
---|
Returns the Currency
instance for the given ISO 4217 currency code.
IllegalArgumentException | if the currency code is not a supported ISO 4217 currency code. |
---|
Returns the localized currency symbol for this currency in locale
.
That is, given "USD" and Locale.US, you'd get "$", but given "USD" and a non-US locale,
you'd get "US$".
If the locale only specifies a language rather than a language and a country (such as
Locale.JAPANESE
or {new Locale("en", "")} rather than Locale.JAPAN
or
{new Locale("en", "US")}), the ISO 4217 currency code is returned.
If there is no locale-specific currency symbol, the ISO 4217 currency code is returned.
Equivalent to getSymbol(Locale.getDefault())
.
See "Be wary of the default locale".
Returns this currency's ISO 4217 currency code.