java.lang.Object | |
↳ | java.util.Currency |
This class represents a currency as identified in the ISO 4217 currency codes.
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 currency code. | |||||||||||
Returns the symbol for this currency in the default locale.
| |||||||||||
Returns the symbol for this currency in the given
Locale . | |||||||||||
Returns this currency's ISO 4217 currency code.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Returns this Currency
's ISO 4217 currency code.
Currency
's ISO 4217 currency code.
Returns the default number of fraction digits for this currency. For instance, the default number of fraction digits for the US dollar is 2. For the Japanese Yen the number is 0. In the case of pseudo-currencies, such as IMF Special Drawing Rights, -1 is returned.
Returns the Currency
instance for this Locale
's country.
locale | the Locale of a country. |
---|
Currency
used in the country defined by the locale parameter.IllegalArgumentException | if the locale's country is not a supported ISO 3166 Country. |
---|
Returns the Currency
instance for the given currency code.
currencyCode | the currency code. |
---|
Currency
instance for this currency code.IllegalArgumentException | if the currency code is not a supported ISO 4217 currency code. |
---|
Returns the symbol for this currency in the default locale. For instance, if the default locale is the US, the symbol of the US dollar is "$". For other locales it may be "US$". If no symbol can be determined, the ISO 4217 currency code of the US dollar is returned.
Currency
in the default Locale
.
Returns the symbol for this currency in the given 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 countries (e.g.
Locale.JAPANESE, new Locale("en","")
), the the ISO
4217 currency code is returned.
If there is no currency symbol specific to this locale does not exist, the ISO 4217 currency code is returned.
locale | the locale for which the currency symbol should be returned. |
---|
Currency
's symbol in the specified
locale.
Returns this currency's ISO 4217 currency code.