public enum CurrencyCode extends Enum<CurrencyCode>
The initial entries in this enum was created based on the official currency & funds code list (ISO 4217) of January 1, 2014.
Enum Constant and Description |
---|
AED
UAE Dirham
[numeric code = 784, minor unit = 2]
|
AFN
Afghani
[numeric code = 971, minor unit = 2]
|
ALL
Lek
[numeric code = 8, minor unit = 2]
|
AMD
Armenian Dram
[numeric code = 51, minor unit = 2]
|
ANG
Netherlands Antillean Guilder
[numeric code = 532, minor unit = 2]
|
AOA
Kwanza
[numeric code = 973, minor unit = 2]
|
ARS
Argentine Peso
[numeric code = 32, minor unit = 2]
|
AUD
Australian Dollar
[numeric code = 36, minor unit = 2]
|
AWG
Aruban Florin
[numeric code = 533, minor unit = 2]
|
AZN
Azerbaijanian Manat
[numeric code = 944, minor unit = 2]
|
BAM
Convertible Mark
[numeric code = 977, minor unit = 2]
|
BBD
Barbados Dollar
[numeric code = 52, minor unit = 2]
|
BDT
Taka
[numeric code = 50, minor unit = 2]
|
BGN
Bulgarian Lev
[numeric code = 975, minor unit = 2]
|
BHD
Bahraini Dinar
[numeric code = 48, minor unit = 3]
|
BIF
Burundi Franc
[numeric code = 108, minor unit = 0]
|
BMD
Bermudian Dollar
[numeric code = 60, minor unit = 2]
|
BND
Brunei Dollar
[numeric code = 96, minor unit = 2]
|
BOB
Boliviano
[numeric code = 68, minor unit = 2]
|
BOV
Mvdol
[numeric code = 984, minor unit = 2, fund]
|
BRL
Brazilian Real
[numeric code = 986, minor unit = 2]
|
BSD
Bahamian Dollar
[numeric code = 44, minor unit = 2]
|
BTN
Ngultrum
[numeric code = 64, minor unit = 2]
|
BWP
Pula
[numeric code = 72, minor unit = 2]
|
BYN
Belarusian Ruble
[numeric code = 933, minor unit = 2]
|
BYR
Deprecated.
|
BZD
Belize Dollar
[numeric code = 84, minor unit = 2]
|
CAD
Canadian Dollar
[numeric code = 124, minor unit = 2]
|
CDF
Congolese Franc
[numeric code = 976, minor unit = 2]
|
CHE
WIR Euro
[numeric code = 947, minor unit = 2, fund]
|
CHF
Swiss Franc
[numeric code = 756, minor unit = 2]
|
CHW
WIR Franc
[numeric code = 948, minor unit = 2, fund]
|
CLF
Unidad de Fomento
[numeric code = 990, minor unit = 0, fund]
|
CLP
Chilean Peso
[numeric code = 152, minor unit = 0]
|
CNY
Yuan Renminbi
[numeric code = 156, minor unit = 2]
|
COP
Colombian Peso
[numeric code = 170, minor unit = 2]
|
COU
Unidad de Valor Real
[numeric code = 970, minor unit = 2, fund]
|
CRC
Costa Rican Colon
[numeric code = 188, minor unit = 2]
|
CUC
Peso Convertible
[numeric code = 931, minor unit = 2]
|
CUP
Cuban Peso
[numeric code = 192, minor unit = 2]
|
CVE
Cape Verde Escudo
[numeric code = 132, minor unit = 2]
|
CZK
Czech Koruna
[numeric code = 203, minor unit = 2]
|
DJF
Djibouti Franc
[numeric code = 262, minor unit = 0]
|
DKK
Danish Krone
[numeric code = 208, minor unit = 2]
|
DOP
Dominican Peso
[numeric code = 214, minor unit = 2]
|
DZD
Algerian Dinar
[numeric code = 12, minor unit = 2]
|
EGP
Egyptian Pound
[numeric code = 818, minor unit = 2]
|
ERN
Nakfa
[numeric code = 232, minor unit = 2]
|
ETB
Ethiopian Birr
[numeric code = 230, minor unit = 2]
|
EUR
Euro
[numeric code = 978, minor unit = 2]
|
FJD
Fiji Dollar
[numeric code = 242, minor unit = 2]
|
FKP
Falkland Islands Pound
[numeric code = 238, minor unit = 2]
|
GBP
Pound Sterling
[numeric code = 826, minor unit = 2]
|
GEL
Lari
[numeric code = 981, minor unit = 2]
|
GHS
Ghana Cedi
[numeric code = 936, minor unit = 2]
|
GIP
Gibraltar Pound
[numeric code = 292, minor unit = 2]
|
GMD
Dalasi
[numeric code = 270, minor unit = 2]
|
GNF
Guinea Franc
[numeric code = 324, minor unit = 0]
|
GTQ
Quetzal
[numeric code = 320, minor unit = 2]
|
GYD
Guyana Dollar
[numeric code = 328, minor unit = 2]
|
HKD
Hong Kong Dollar
[numeric code = 344, minor unit = 2]
|
HNL
Lempira
[numeric code = 340, minor unit = 2]
|
HRK
Croatian Kuna
[numeric code = 191, minor unit = 2]
|
HTG
Gourde
[numeric code = 332, minor unit = 2]
|
HUF
Forint
[numeric code = 348, minor unit = 2]
|
IDR
Rupiah
[numeric code = 360, minor unit = 2]
|
ILS
New Israeli Sheqel
[numeric code = 376, minor unit = 2]
|
INR
Indian Rupee
[numeric code = 356, minor unit = 2]
|
IQD
Iraqi Dinar
[numeric code = 368, minor unit = 3]
|
IRR
Iranian Rial
[numeric code = 364, minor unit = 2]
|
ISK
Iceland Krona
[numeric code = 352, minor unit = 0]
|
JMD
Jamaican Dollar
[numeric code = 388, minor unit = 2]
|
JOD
Jordanian Dinar
[numeric code = 400, minor unit = 3]
|
JPY
Yen
[numeric code = 392, minor unit = 0]
|
KES
Kenyan Shilling
[numeric code = 404, minor unit = 2]
|
KGS
Som
[numeric code = 417, minor unit = 2]
|
KHR
Riel
[numeric code = 116, minor unit = 2]
|
KMF
Comoro Franc
[numeric code = 174, minor unit = 0]
|
KPW
North Korean Won
[numeric code = 408, minor unit = 2]
|
KRW
Won
[numeric code = 410, minor unit = 0]
|
KWD
Kuwaiti Dinar
[numeric code = 414, minor unit = 3]
|
KYD
Cayman Islands Dollar
[numeric code = 136, minor unit = 2]
|
KZT
Tenge
[numeric code = 398, minor unit = 2]
|
LAK
Kip
[numeric code = 418, minor unit = 2]
|
LBP
Lebanese Pound
[numeric code = 422, minor unit = 2]
|
LKR
Sri Lanka Rupee
[numeric code = 144, minor unit = 2]
|
LRD
Liberian Dollar
[numeric code = 430, minor unit = 2]
|
LSL
Loti
[numeric code = 426, minor unit = 2]
|
LTL
Deprecated.
|
LYD
Libyan Dinar
[numeric code = 434, minor unit = 3]
|
MAD
Moroccan Dirham
[numeric code = 504, minor unit = 2]
|
MDL
Moldovan Leu
[numeric code = 498, minor unit = 2]
|
MGA
Malagasy Ariary
[numeric code = 969, minor unit = 2]
|
MKD
Denar
[numeric code = 807, minor unit = 2]
|
MMK
Kyat
[numeric code = 104, minor unit = 2]
|
MNT
Tugrik
[numeric code = 496, minor unit = 2]
|
MOP
Pataca
[numeric code = 446, minor unit = 2]
|
MRO
Deprecated.
|
MRU
Ouguiya
[numeric code = 929, minor unit = 2]
|
MUR
Mauritius Rupee
[numeric code = 480, minor unit = 2]
|
MVR
Rufiyaa
[numeric code = 462, minor unit = 2]
|
MWK
Kwacha
[numeric code = 454, minor unit = 2]
|
MXN
Mexican Peso
[numeric code = 484, minor unit = 2]
|
MXV
Mexican Unidad de Inversion (UDI)
[numeric code = 979, minor unit = 2, fund]
|
MYR
Malaysian Ringgit
[numeric code = 458, minor unit = 2]
|
MZN
Mozambique Metical
[numeric code = 943, minor unit = 2]
|
NAD
Namibia Dollar
[numeric code = 516, minor unit = 2]
|
NGN
Naira
[numeric code = 566, minor unit = 2]
|
NIO
Cordoba Oro
[numeric code = 558, minor unit = 2]
|
NOK
Norwegian Krone
[numeric code = 578, minor unit = 2]
|
NPR
Nepalese Rupee
[numeric code = 524, minor unit = 2]
|
NZD
New Zealand Dollar
[numeric code = 554, minor unit = 2]
|
OMR
Rial Omani
[numeric code = 512, minor unit = 3]
|
PAB
Balboa
[numeric code = 590, minor unit = 2]
|
PEN
Nuevo Sol
[numeric code = 604, minor unit = 2]
|
PGK
Kina
[numeric code = 598, minor unit = 2]
|
PHP
Philippine Peso
[numeric code = 608, minor unit = 2]
|
PKR
Pakistan Rupee
[numeric code = 586, minor unit = 2]
|
PLN
Zloty
[numeric code = 985, minor unit = 2]
|
PYG
Guarani
[numeric code = 600, minor unit = 0]
|
QAR
Qatari Rial
[numeric code = 634, minor unit = 2]
|
RON
New Romanian Leu
[numeric code = 946, minor unit = 2]
|
RSD
Serbian Dinar
[numeric code = 941, minor unit = 2]
|
RUB
Russian Ruble
[numeric code = 643, minor unit = 2]
|
RUR
Deprecated.
|
RWF
Rwanda Franc
[numeric code = 646, minor unit = 0]
|
SAR
Saudi Riyal
[numeric code = 682, minor unit = 2]
|
SBD
Solomon Islands Dollar
[numeric code = 90, minor unit = 2]
|
SCR
Seychelles Rupee
[numeric code = 690, minor unit = 2]
|
SDG
Sudanese Pound
[numeric code = 938, minor unit = 2]
|
SEK
Swedish Krona
[numeric code = 752, minor unit = 2]
|
SGD
Singapore Dollar
[numeric code = 702, minor unit = 2]
|
SHP
Saint Helena Pound
[numeric code = 654, minor unit = 2]
|
SLL
Leone
[numeric code = 694, minor unit = 2]
|
SOS
Somali Shilling
[numeric code = 706, minor unit = 2]
|
SRD
Surinam Dollar
[numeric code = 968, minor unit = 2]
|
SSP
South Sudanese Pound
[numeric code = 728, minor unit = 2]
|
STD
Deprecated.
|
STN
Dobra
[numeric code = 930, minor unit = 2]
|
SVC
El Salvador Colon
[numeric code = 222, minor unit = 2]
|
SYP
Syrian Pound
[numeric code = 760, minor unit = 2]
|
SZL
Lilangeni
[numeric code = 748, minor unit = 2]
|
THB
Baht
[numeric code = 764, minor unit = 2]
|
TJS
Somoni
[numeric code = 972, minor unit = 2]
|
TMT
Turkmenistan New Manat
[numeric code = 934, minor unit = 2]
|
TND
Tunisian Dinar
[numeric code = 788, minor unit = 3]
|
TOP
Paʻanga
[numeric code = 776, minor unit = 2]
|
TRY
Turkish Lira
[numeric code = 949, minor unit = 2]
|
TTD
Trinidad and Tobago Dollar
[numeric code = 780, minor unit = 2]
|
TWD
New Taiwan Dollar
[numeric code = 901, minor unit = 2]
|
TZS
Tanzanian Shilling
[numeric code = 834, minor unit = 2]
|
UAH
Hryvnia
[numeric code = 980, minor unit = 2]
|
UGX
Uganda Shilling
[numeric code = 800, minor unit = 0]
|
UNDEFINED
Undefined.
|
USD
US Dollar
[numeric code = 840, minor unit = 2]
|
USN
US Dollar (Next day)
[numeric code = 997, minor unit = 2, fund]
|
USS
US Dollar (Same day)
[numeric code = 998, minor unit = 2, fund]
|
UYI
Uruguay Peso en Unidades Indexadas (URUIURUI)
[numeric code = 940, minor unit = 0, fund]
|
UYU
Peso Uruguayo
[numeric code = 858, minor unit = 2]
|
UZS
Uzbekistan Sum
[numeric code = 860, minor unit = 2]
|
VEF
Deprecated.
|
VES
Bolivar
[numeric code = 928, minor unit = 2]
|
VND
Dong
[numeric code = 704, minor unit = 0]
|
VUV
Vatu
[numeric code = 548, minor unit = 0]
|
WST
Tala
[numeric code = 882, minor unit = 2]
|
XAF
CFA Franc BEAC
[numeric code = 950, minor unit = 0]
|
XAG
Silver
[numeric code = 961, minor unit = -1, precious metal]
|
XAU
Gold
[numeric code = 959, minor unit = -1, precious metal]
|
XBA
Bond Markets Unit European Composite Unit (EURCO)
[numeric code = 955, minor unit = -1]
|
XBB
Bond Markets Unit European Monetary Unit (E.M.U.-6)
[numeric code = 956, minor unit = -1]
|
XBC
Bond Markets Unit European Unit of Account 9 (E.U.A.-9)
[numeric code = 957, minor unit = -1]
|
XBD
Bond Markets Unit European Unit of Account 17 (E.U.A.-17)
[numeric code = 958, minor unit = -1]
|
XCD
East Caribbean Dollar
[numeric code = 951, minor unit = 2]
|
XDR
SDR (Special Drawing Right)
[numeric code = 960, minor unit = -1]
|
XOF
CFA Franc BCEAO
[numeric code = 952, minor unit = 0]
|
XPD
Palladium
[numeric code = 964, minor unit = -1, precious metal]
|
XPF
CFP Franc
[numeric code = 953, minor unit = 0]
|
XPT
Platinum
[numeric code = 962, minor unit = -1, precious metal]
|
XSU
Sucre
[numeric code = 994, minor unit = -1]
|
XTS
Codes specifically reserved for testing purposes.
|
XUA
ADB Unit of Account
[numeric code = 965, minor unit = -1]
|
XXX
The codes assigned for transactions where no currency is involved
[numeric code = 999, minor unit = -1]
|
YER
Yemeni Rial
[numeric code = 886, minor unit = 2]
|
ZAR
Rand
[numeric code = 710, minor unit = 2]
|
ZMW
Zambian Kwacha
[numeric code = 967, minor unit = 2]
|
ZWL
Zimbabwe Dollar
[numeric code = 932, minor unit = 2]
|
Modifier and Type | Method and Description |
---|---|
static List<CurrencyCode> |
findByName(Pattern pattern)
Get a list of
CurrencyCode by a name pattern. |
static List<CurrencyCode> |
findByName(String regex)
Get a list of
CurrencyCode by a name regular expression. |
static CurrencyCode |
getByCode(int code)
Get a
CurrencyCode that corresponds to the given
ISO 4217
numeric code. |
static CurrencyCode |
getByCode(String code)
Get a
CurrencyCode that corresponds to the given
ISO 4217
alpha-3 code. |
static CurrencyCode |
getByCode(String code,
boolean caseSensitive)
Get a
CurrencyCode that corresponds to the given
ISO 4217
alpha-3 code. |
static CurrencyCode |
getByCodeIgnoreCase(String code)
Get a
CurrencyCode that corresponds to the given
ISO 4217
alpha-3 code. |
static List<CurrencyCode> |
getByCountry(CountryCode country)
Get a list of
CurrencyCode instances whose country list
contains the specified country. |
static List<CurrencyCode> |
getByCountry(String country)
Get a list of
CurrencyCode instances whose country
list contains the specified country. |
static List<CurrencyCode> |
getByCountry(String country,
boolean caseSensitive)
Get a list of
CurrencyCode instances whose country
list contains the specified country. |
static List<CurrencyCode> |
getByCountryIgnoreCase(String country)
Get a list of
CurrencyCode instances whose country
list contains the specified country. |
List<CountryCode> |
getCountryList()
Get the list of countries using this currency.
|
Currency |
getCurrency()
Get the
Currency instance that corresponds to
this currency code. |
int |
getMinorUnit()
Get the minor unit.
|
String |
getName()
Get the currency name.
|
int |
getNumeric()
Get the ISO 4217 numeric code.
|
boolean |
isFund()
Check if this currency code represents a fund.
|
boolean |
isPreciousMetal()
Check if this currency code represents a precious metal.
|
static CurrencyCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CurrencyCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CurrencyCode UNDEFINED
This is not an official ISO 4217 code.
XXX: 999 No currency
public static final CurrencyCode AED
public static final CurrencyCode AFN
public static final CurrencyCode ALL
public static final CurrencyCode AMD
public static final CurrencyCode ANG
Used by:
public static final CurrencyCode AOA
public static final CurrencyCode ARS
public static final CurrencyCode AUD
public static final CurrencyCode AWG
public static final CurrencyCode AZN
public static final CurrencyCode BAM
public static final CurrencyCode BBD
public static final CurrencyCode BDT
public static final CurrencyCode BGN
public static final CurrencyCode BHD
public static final CurrencyCode BIF
public static final CurrencyCode BMD
public static final CurrencyCode BND
public static final CurrencyCode BOB
public static final CurrencyCode BOV
Used by:
BO
: BOLIVIA, PLURINATIONAL STATE OF
public static final CurrencyCode BRL
public static final CurrencyCode BSD
public static final CurrencyCode BTN
public static final CurrencyCode BWP
public static final CurrencyCode BYN
Used by:
BY
: BELARUS
This currency code was added by ISO 4217 AMENDMENT NUMBER 161 (18 December 2015). Effective from 1 July 2016.
BYR
public static final CurrencyCode BYR
BYN
public static final CurrencyCode BZD
public static final CurrencyCode CAD
public static final CurrencyCode CDF
public static final CurrencyCode CHE
Used by:
CH
: SWITZERLAND
public static final CurrencyCode CHF
public static final CurrencyCode CHW
Used by:
CH
: SWITZERLAND
public static final CurrencyCode CLF
public static final CurrencyCode CLP
public static final CurrencyCode CNY
public static final CurrencyCode COP
public static final CurrencyCode COU
public static final CurrencyCode CRC
public static final CurrencyCode CUC
public static final CurrencyCode CUP
public static final CurrencyCode CVE
public static final CurrencyCode CZK
public static final CurrencyCode DJF
public static final CurrencyCode DKK
Used by:
public static final CurrencyCode DOP
public static final CurrencyCode DZD
public static final CurrencyCode EGP
public static final CurrencyCode ERN
public static final CurrencyCode ETB
public static final CurrencyCode EUR
Used by:
AD
: ANDORRA
AT
: AUSTRIA
AX
: ÅLAND ISLANDS
BE
: BELGIUM
BL
: SAINT BARTHÉLEMY
CY
: CYPRUS
DE
: GERMANY
EE
: ESTONIA
ES
: SPAIN
EU
: EUROPEAN UNION
FI
: FINLAND
FR
: FRANCE
GF
: FRENCH GUIANA
GP
: GUADELOUPE
GR
: GREECE
IE
: IRELAND
IT
: ITALY
LT
: LITHUANIA
LU
: LUXEMBOURG
LV
: LATVIA
MC
: MONACO
ME
: MONTENEGRO
MF
: SAINT MARTIN (FRENCH PART)
MQ
: MARTINIQUE
MT
: MALTA
NL
: NETHERLANDS
PM
: SAINT PIERRE AND MIQUELON
PT
: PORTUGAL
RE
: RÉUNION
SI
: SLOVENIA
SK
: SLOVAKIA
SM
: SAN MARINO
TF
: FRENCH SOUTHERN TERRITORIES
VA
: HOLY SEE (VATICAN CITY STATE)
XK
: KOSOVO, REPUBLIC OF
YT
: MAYOTTE
public static final CurrencyCode FJD
public static final CurrencyCode FKP
Used by:
FK
: FALKLAND ISLANDS (MALVINAS)
public static final CurrencyCode GBP
Used by:
public static final CurrencyCode GEL
public static final CurrencyCode GHS
public static final CurrencyCode GIP
public static final CurrencyCode GMD
public static final CurrencyCode GNF
public static final CurrencyCode GTQ
public static final CurrencyCode GYD
public static final CurrencyCode HKD
public static final CurrencyCode HNL
public static final CurrencyCode HRK
public static final CurrencyCode HTG
public static final CurrencyCode HUF
public static final CurrencyCode IDR
public static final CurrencyCode ILS
public static final CurrencyCode INR
public static final CurrencyCode IQD
public static final CurrencyCode IRR
public static final CurrencyCode ISK
public static final CurrencyCode JMD
public static final CurrencyCode JOD
public static final CurrencyCode JPY
public static final CurrencyCode KES
public static final CurrencyCode KGS
public static final CurrencyCode KHR
public static final CurrencyCode KMF
public static final CurrencyCode KPW
Used by:
KP
: KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF
public static final CurrencyCode KRW
public static final CurrencyCode KWD
public static final CurrencyCode KYD
public static final CurrencyCode KZT
public static final CurrencyCode LAK
public static final CurrencyCode LBP
public static final CurrencyCode LKR
public static final CurrencyCode LRD
public static final CurrencyCode LSL
public static final CurrencyCode LTL
public static final CurrencyCode LYD
public static final CurrencyCode MAD
public static final CurrencyCode MDL
public static final CurrencyCode MGA
public static final CurrencyCode MKD
public static final CurrencyCode MMK
public static final CurrencyCode MNT
public static final CurrencyCode MOP
public static final CurrencyCode MRO
MRU
public static final CurrencyCode MRU
Used by:
MR
: MAURITANIA
Excerpted from ISO 4217 AMENDMENT NUMBER 165:
The Central Bank of Mauritania is carrying out a re-denomination of their local currency, with the entry into circulation of the OUGUIYA. The conversion rate is 10 (old) Ouguiya to 1 (new) Ouguiya (10:1).
From 1 January 2018 to 30 June 2018, the old and new denominations run concurrently.
MRO
,
ISO 4217 AMENDMENT NUMBER 165public static final CurrencyCode MUR
public static final CurrencyCode MVR
public static final CurrencyCode MWK
public static final CurrencyCode MXN
public static final CurrencyCode MXV
public static final CurrencyCode MYR
public static final CurrencyCode MZN
public static final CurrencyCode NAD
public static final CurrencyCode NGN
public static final CurrencyCode NIO
public static final CurrencyCode NOK
Used by:
public static final CurrencyCode NPR
public static final CurrencyCode NZD
public static final CurrencyCode OMR
public static final CurrencyCode PAB
public static final CurrencyCode PEN
public static final CurrencyCode PGK
public static final CurrencyCode PHP
public static final CurrencyCode PKR
public static final CurrencyCode PLN
public static final CurrencyCode PYG
public static final CurrencyCode QAR
public static final CurrencyCode RON
public static final CurrencyCode RSD
public static final CurrencyCode RUB
RUR
public static final CurrencyCode RUR
RUB
= 1,000 RUR
).
[numeric code = 810, minor unit = 2]
Used by:
RU
: RUSSIAN FEDERATION
RUB
public static final CurrencyCode RWF
public static final CurrencyCode SAR
public static final CurrencyCode SBD
public static final CurrencyCode SCR
public static final CurrencyCode SDG
public static final CurrencyCode SEK
public static final CurrencyCode SGD
public static final CurrencyCode SHP
Used by:
SH
: SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA
public static final CurrencyCode SLL
public static final CurrencyCode SOS
public static final CurrencyCode SRD
public static final CurrencyCode SSP
public static final CurrencyCode STD
STN
public static final CurrencyCode STN
Used by:
ST
: SAO TOME AND PRINCIPE
Excerpted from ISO 4217 AMENDMENT NUMBER 164:
The Central Bank of S. Tomé and Príncipe is carrying out an important Monetary Reform Project, with the entry into circulation of a new family of DOBRAS. The conversion rate is 1000 (old) Dobras to 1 (new) Dobra (1000:1).
From 1 January 2018 to 30 June 2018, the old and new denominations run concurrently.
STD
,
ISO 4217 AMENDMENT NUMBER 164public static final CurrencyCode SVC
public static final CurrencyCode SYP
public static final CurrencyCode SZL
public static final CurrencyCode THB
public static final CurrencyCode TJS
public static final CurrencyCode TMT
public static final CurrencyCode TND
public static final CurrencyCode TOP
public static final CurrencyCode TRY
public static final CurrencyCode TTD
public static final CurrencyCode TWD
public static final CurrencyCode TZS
public static final CurrencyCode UAH
public static final CurrencyCode UGX
public static final CurrencyCode USD
Used by:
AS
: AMERICAN SAMOA
BQ
: BONAIRE, SINT EUSTATIUS AND SABA
EC
: ECUADOR
FM
: MICRONESIA, FEDERATED STATES OF
GU
: GUAM
HT
: HAITI
IO
: BRITISH INDIAN OCEAN TERRITORY
MH
: MARSHALL ISLANDS
MP
: NORTHERN MARIANA ISLANDS
PA
: PANAMA
PR
: PUERTO RICO
PW
: PALAU
SV
: EL SALVADOR
TC
: TURKS AND CAICOS ISLANDS
TL
: TIMOR-LESTE
UM
: UNITED STATES MINOR OUTLYING ISLANDS
US
: UNITED STATES
VG
: VIRGIN ISLANDS (BRITISH)
VI
: VIRGIN ISLANDS (US)
public static final CurrencyCode USN
Used by:
US
: UNITED STATES
public static final CurrencyCode USS
Used by:
US
: UNITED STATES
public static final CurrencyCode UYI
Used by:
UY
: URUGUAY
public static final CurrencyCode UYU
public static final CurrencyCode UZS
public static final CurrencyCode VEF
VES
public static final CurrencyCode VES
VEF
public static final CurrencyCode VND
public static final CurrencyCode VUV
public static final CurrencyCode WST
public static final CurrencyCode XAF
public static final CurrencyCode XAG
public static final CurrencyCode XAU
public static final CurrencyCode XBA
public static final CurrencyCode XBB
public static final CurrencyCode XBC
public static final CurrencyCode XBD
public static final CurrencyCode XCD
public static final CurrencyCode XDR
public static final CurrencyCode XOF
public static final CurrencyCode XPD
public static final CurrencyCode XPF
public static final CurrencyCode XPT
public static final CurrencyCode XSU
public static final CurrencyCode XTS
public static final CurrencyCode XUA
public static final CurrencyCode XXX
public static final CurrencyCode YER
public static final CurrencyCode ZAR
public static final CurrencyCode ZMW
public static final CurrencyCode ZWL
public static CurrencyCode[] values()
for (CurrencyCode c : CurrencyCode.values()) System.out.println(c);
public static CurrencyCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getName()
public int getNumeric()
public int getMinorUnit()
-1
means N.A.public List<CountryCode> getCountryList()
public boolean isFund()
CurrencyCode
instances listed below return true
.
public boolean isPreciousMetal()
CurrencyCode
instances listed below return true
.
public Currency getCurrency()
Currency
instance that corresponds to
this currency code.
This method is an alias of Currency
.
getInstance
(this.name())
.
The only difference is that this method returns null
when Currency.getInstance(String)
throws IllegalArgumentException
.
Currency
instance, or null
if this
ISO 4217 code is not supported by the implementation
of Currency.getInstance(String)
.Currency.getInstance(String)
public static CurrencyCode getByCode(String code)
CurrencyCode
that corresponds to the given
ISO 4217
alpha-3 code.
This method calls getByCode
(code, true)
.
Note that the behavior has changed since the version 1.13. In the older versions,
this method was an alias of getByCode(code, false)
.
code
- ISO 4217
alpha-3 code.
When "UNDEFINED"
is given, CurrencyCode.UNDEFINED
is returned.CurrencyCode
instance, or null
if not found.getByCode(String, boolean)
public static CurrencyCode getByCodeIgnoreCase(String code)
CurrencyCode
that corresponds to the given
ISO 4217
alpha-3 code.
This method calls getByCode
(code, false)
.
code
- ISO 4217
alpha-3 code. Or "UNDEFINED"
(case insensitive).CurrencyCode
instance, or null
if not found.getByCode(String, boolean)
public static CurrencyCode getByCode(String code, boolean caseSensitive)
CurrencyCode
that corresponds to the given
ISO 4217
alpha-3 code.code
- ISO 4217
alpha-3 code.
Or "UNDEFINED"
(its case sensitivity depends on the value of
caseSensitive
).caseSensitive
- If true
, the given code should consist of upper-case letters only.
If false
, this method internally canonicalizes the given code by
String.toUpperCase()
and then performs search. For example,
getByCode("jpy", true)
returns null
, but on the other hand,
getByCode("jpy", false)
returns CurrencyCode.JPY
.CurrencyCode
instance, or null
if not found.public static CurrencyCode getByCode(int code)
CurrencyCode
that corresponds to the given
ISO 4217
numeric code.code
- ISO 4217
numeric code.CurrencyCode
instance, or null
if not found.
If 0 or a negative value is given, null
is returned.public static List<CurrencyCode> getByCountry(String country)
CurrencyCode
instances whose country
list contains the specified country.
This method is an alias of getByCountry
(country, true)
.
Note that the behavior has changed since the version 1.13.
In the older versions, this method was an alias of getByCountry(code, false)
.
country
- Country code. ISO 3166-1 alpha-2 or alpha-3.CurrencyCode
instances. If there is no
CurrencyCode
instance whose country list contains
the specified country, the size of the returned list is zero.public static List<CurrencyCode> getByCountryIgnoreCase(String country)
CurrencyCode
instances whose country
list contains the specified country.
This method is an alias of getByCountry
(country, false)
.
country
- Country code. ISO 3166-1 alpha-2 or alpha-3.CurrencyCode
instances. If there is no
CurrencyCode
instance whose country list contains
the specified country, the size of the returned list is zero.public static List<CurrencyCode> getByCountry(String country, boolean caseSensitive)
CurrencyCode
instances whose country
list contains the specified country.
This method is an alias of getByCountry
(
CountryCode
.
getByCode
(country, caseSensitive))
.
country
- Country code. ISO 3166-1 alpha-2 or alpha-3.caseSensitive
- If true
, the given code should consist of uppercase
letters only. If false
, case is ignored.CurrencyCode
instances. If there is no
CurrencyCode
instance whose country list contains
the specified country, the size of the returned list is zero.public static List<CurrencyCode> getByCountry(CountryCode country)
CurrencyCode
instances whose country list
contains the specified country.country
- CountryCode
instance that represents a country.CurrencyCode
instances. If there is no
CurrencyCode
instance whose country list contains
the specified country, the size of the returned list is zero.public static List<CurrencyCode> findByName(String regex)
CurrencyCode
by a name regular expression.
This method is almost equivalent to findByName
(Pattern.compile(regex))
.
regex
- Regular expression for names.CurrencyCode
. If nothing has matched,
an empty list is returned.IllegalArgumentException
- regex
is null
.PatternSyntaxException
- regex
failed to be compiled.public static List<CurrencyCode> findByName(Pattern pattern)
CurrencyCode
by a name pattern.
For example, the list obtained by the code snippet below:
Pattern pattern = Pattern.compile(".*Ruble");
List<CurrencyCode> list = CurrencyCode.findByName(pattern);
contains 4 CurrencyCode
s as listed below.
pattern
- Pattern to match names.CurrencyCde
. If nothing has matched,
an empty list is returned.IllegalArgumentException
- pattern
is null
.Copyright © 2021. All rights reserved.