Enum CurrencyCode
- java.lang.Object
-
- java.lang.Enum<CurrencyCode>
-
- com.neovisionaries.i18n.CurrencyCode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CurrencyCode>
public enum CurrencyCode extends java.lang.Enum<CurrencyCode>
Currency code (ISO 4217).The initial entries in this enum was created based on the official currency & funds code list (ISO 4217) of January 1, 2014.
- Since:
- 1.9
- See Also:
- The official currency & funds code list, ISO 4217
-
-
Enum Constant Summary
Enum Constants Enum Constant 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]
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<CountryCode>
countryList
private int
minorUnit
private java.lang.String
name
private int
numeric
private static java.util.Map<java.lang.Integer,CurrencyCode>
numericMap
-
Constructor Summary
Constructors Modifier Constructor Description private
CurrencyCode(java.lang.String name, int numeric, int minorUnit, CountryCode... countries)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
canonicalize(java.lang.String code, boolean caseSensitive)
static java.util.List<CurrencyCode>
findByName(java.lang.String regex)
Get a list ofCurrencyCode
by a name regular expression.static java.util.List<CurrencyCode>
findByName(java.util.regex.Pattern pattern)
Get a list ofCurrencyCode
by a name pattern.static CurrencyCode
getByCode(int code)
Get aCurrencyCode
that corresponds to the given ISO 4217 numeric code.static CurrencyCode
getByCode(java.lang.String code)
Get aCurrencyCode
that corresponds to the given ISO 4217 alpha-3 code.static CurrencyCode
getByCode(java.lang.String code, boolean caseSensitive)
Get aCurrencyCode
that corresponds to the given ISO 4217 alpha-3 code.static CurrencyCode
getByCodeIgnoreCase(java.lang.String code)
Get aCurrencyCode
that corresponds to the given ISO 4217 alpha-3 code.static java.util.List<CurrencyCode>
getByCountry(CountryCode country)
Get a list ofCurrencyCode
instances whose country list contains the specified country.static java.util.List<CurrencyCode>
getByCountry(java.lang.String country)
Get a list ofCurrencyCode
instances whose country list contains the specified country.static java.util.List<CurrencyCode>
getByCountry(java.lang.String country, boolean caseSensitive)
Get a list ofCurrencyCode
instances whose country list contains the specified country.static java.util.List<CurrencyCode>
getByCountryIgnoreCase(java.lang.String country)
Get a list ofCurrencyCode
instances whose country list contains the specified country.java.util.List<CountryCode>
getCountryList()
Get the list of countries using this currency.java.util.Currency
getCurrency()
Get theCurrency
instance that corresponds to this currency code.int
getMinorUnit()
Get the minor unit.java.lang.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(java.lang.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.
-
-
-
Enum Constant Detail
-
UNDEFINED
public static final CurrencyCode UNDEFINED
Undefined.This is not an official ISO 4217 code.
- Since:
- 1.14
- See Also:
XXX: 999 No currency
-
AED
public static final CurrencyCode AED
-
AFN
public static final CurrencyCode AFN
-
ALL
public static final CurrencyCode ALL
-
AMD
public static final CurrencyCode AMD
-
ANG
public static final CurrencyCode ANG
Netherlands Antillean Guilder [numeric code = 532, minor unit = 2]Used by:
-
AOA
public static final CurrencyCode AOA
-
ARS
public static final CurrencyCode ARS
-
AUD
public static final CurrencyCode AUD
-
AWG
public static final CurrencyCode AWG
-
AZN
public static final CurrencyCode AZN
-
BAM
public static final CurrencyCode BAM
-
BBD
public static final CurrencyCode BBD
-
BDT
public static final CurrencyCode BDT
-
BGN
public static final CurrencyCode BGN
-
BHD
public static final CurrencyCode BHD
-
BIF
public static final CurrencyCode BIF
-
BMD
public static final CurrencyCode BMD
-
BND
public static final CurrencyCode BND
-
BOB
public static final CurrencyCode BOB
-
BOV
public static final CurrencyCode BOV
Mvdol [numeric code = 984, minor unit = 2, fund]Used by:
BO
: BOLIVIA, PLURINATIONAL STATE OF
-
BRL
public static final CurrencyCode BRL
-
BSD
public static final CurrencyCode BSD
-
BTN
public static final CurrencyCode BTN
-
BWP
public static final CurrencyCode BWP
-
BYN
public static final CurrencyCode BYN
Belarusian Ruble [numeric code = 933, minor unit = 2]Used by:
BY
: BELARUS
This currency code was added by ISO 4217 AMENDMENT NUMBER 161 (18 December 2015). Effective from 1 July 2016.
- Since:
- 1.19
- See Also:
- ISO 4217 AMENDMENT NUMBER 161,
BYR
-
BYR
public static final CurrencyCode BYR
Deprecated.- See Also:
BYN
-
BZD
public static final CurrencyCode BZD
-
CAD
public static final CurrencyCode CAD
-
CDF
public static final CurrencyCode CDF
-
CHE
public static final CurrencyCode CHE
WIR Euro [numeric code = 947, minor unit = 2, fund]Used by:
CH
: SWITZERLAND
-
CHF
public static final CurrencyCode CHF
-
CHW
public static final CurrencyCode CHW
WIR Franc [numeric code = 948, minor unit = 2, fund]Used by:
CH
: SWITZERLAND
-
CLF
public static final CurrencyCode CLF
-
CLP
public static final CurrencyCode CLP
-
CNY
public static final CurrencyCode CNY
-
COP
public static final CurrencyCode COP
-
COU
public static final CurrencyCode COU
-
CRC
public static final CurrencyCode CRC
-
CUC
public static final CurrencyCode CUC
-
CUP
public static final CurrencyCode CUP
-
CVE
public static final CurrencyCode CVE
-
CZK
public static final CurrencyCode CZK
-
DJF
public static final CurrencyCode DJF
-
DKK
public static final CurrencyCode DKK
Danish Krone [numeric code = 208, minor unit = 2]Used by:
-
DOP
public static final CurrencyCode DOP
-
DZD
public static final CurrencyCode DZD
-
EGP
public static final CurrencyCode EGP
-
ERN
public static final CurrencyCode ERN
-
ETB
public static final CurrencyCode ETB
-
EUR
public static final CurrencyCode EUR
Euro [numeric code = 978, minor unit = 2]Used by:
AD
: ANDORRAAT
: AUSTRIAAX
: ÅLAND ISLANDSBE
: BELGIUMBL
: SAINT BARTHÉLEMYCY
: CYPRUSDE
: GERMANYEE
: ESTONIAES
: SPAINEU
: EUROPEAN UNIONFI
: FINLANDFR
: FRANCEGF
: FRENCH GUIANAGP
: GUADELOUPEGR
: GREECEIE
: IRELANDIT
: ITALYLT
: LITHUANIALU
: LUXEMBOURGLV
: LATVIAMC
: MONACOME
: MONTENEGROMF
: SAINT MARTIN (FRENCH PART)MQ
: MARTINIQUEMT
: MALTANL
: NETHERLANDSPM
: SAINT PIERRE AND MIQUELONPT
: PORTUGALRE
: RÉUNIONSI
: SLOVENIASK
: SLOVAKIASM
: SAN MARINOTF
: FRENCH SOUTHERN TERRITORIESVA
: HOLY SEE (VATICAN CITY STATE)XK
: KOSOVO, REPUBLIC OFYT
: MAYOTTE
-
FJD
public static final CurrencyCode FJD
-
FKP
public static final CurrencyCode FKP
Falkland Islands Pound [numeric code = 238, minor unit = 2]Used by:
FK
: FALKLAND ISLANDS (MALVINAS)
-
GBP
public static final CurrencyCode GBP
Pound Sterling [numeric code = 826, minor unit = 2]Used by:
-
GEL
public static final CurrencyCode GEL
-
GHS
public static final CurrencyCode GHS
-
GIP
public static final CurrencyCode GIP
-
GMD
public static final CurrencyCode GMD
-
GNF
public static final CurrencyCode GNF
-
GTQ
public static final CurrencyCode GTQ
-
GYD
public static final CurrencyCode GYD
-
HKD
public static final CurrencyCode HKD
-
HNL
public static final CurrencyCode HNL
-
HRK
public static final CurrencyCode HRK
-
HTG
public static final CurrencyCode HTG
-
HUF
public static final CurrencyCode HUF
-
IDR
public static final CurrencyCode IDR
-
ILS
public static final CurrencyCode ILS
-
INR
public static final CurrencyCode INR
-
IQD
public static final CurrencyCode IQD
-
IRR
public static final CurrencyCode IRR
-
ISK
public static final CurrencyCode ISK
-
JMD
public static final CurrencyCode JMD
-
JOD
public static final CurrencyCode JOD
-
JPY
public static final CurrencyCode JPY
-
KES
public static final CurrencyCode KES
-
KGS
public static final CurrencyCode KGS
-
KHR
public static final CurrencyCode KHR
-
KMF
public static final CurrencyCode KMF
-
KPW
public static final CurrencyCode KPW
North Korean Won [numeric code = 408, minor unit = 2]Used by:
KP
: KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF
-
KRW
public static final CurrencyCode KRW
-
KWD
public static final CurrencyCode KWD
-
KYD
public static final CurrencyCode KYD
-
KZT
public static final CurrencyCode KZT
-
LAK
public static final CurrencyCode LAK
-
LBP
public static final CurrencyCode LBP
-
LKR
public static final CurrencyCode LKR
-
LRD
public static final CurrencyCode LRD
-
LSL
public static final CurrencyCode LSL
-
LTL
public static final CurrencyCode LTL
Deprecated.
-
LYD
public static final CurrencyCode LYD
-
MAD
public static final CurrencyCode MAD
-
MDL
public static final CurrencyCode MDL
-
MGA
public static final CurrencyCode MGA
-
MKD
public static final CurrencyCode MKD
-
MMK
public static final CurrencyCode MMK
-
MNT
public static final CurrencyCode MNT
-
MOP
public static final CurrencyCode MOP
-
MRO
public static final CurrencyCode MRO
Deprecated.- See Also:
MRU
-
MRU
public static final CurrencyCode MRU
Ouguiya [numeric code = 929, minor unit = 2]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.
- Since:
- 1.23
- See Also:
MRO
, ISO 4217 AMENDMENT NUMBER 165
-
MUR
public static final CurrencyCode MUR
-
MVR
public static final CurrencyCode MVR
-
MWK
public static final CurrencyCode MWK
-
MXN
public static final CurrencyCode MXN
-
MXV
public static final CurrencyCode MXV
-
MYR
public static final CurrencyCode MYR
-
MZN
public static final CurrencyCode MZN
-
NAD
public static final CurrencyCode NAD
-
NGN
public static final CurrencyCode NGN
-
NIO
public static final CurrencyCode NIO
-
NOK
public static final CurrencyCode NOK
Norwegian Krone [numeric code = 578, minor unit = 2]Used by:
-
NPR
public static final CurrencyCode NPR
-
NZD
public static final CurrencyCode NZD
-
OMR
public static final CurrencyCode OMR
-
PAB
public static final CurrencyCode PAB
-
PEN
public static final CurrencyCode PEN
-
PGK
public static final CurrencyCode PGK
-
PHP
public static final CurrencyCode PHP
-
PKR
public static final CurrencyCode PKR
-
PLN
public static final CurrencyCode PLN
-
PYG
public static final CurrencyCode PYG
-
QAR
public static final CurrencyCode QAR
-
RON
public static final CurrencyCode RON
-
RSD
public static final CurrencyCode RSD
-
RUB
public static final CurrencyCode RUB
- See Also:
RUR
-
RUR
public static final CurrencyCode RUR
Deprecated.Russian Ruble before the 1998 redenomination (1RUB
= 1,000RUR
). [numeric code = 810, minor unit = 2]Used by:
RU
: RUSSIAN FEDERATION
- Since:
- 1.20
- See Also:
RUB
-
RWF
public static final CurrencyCode RWF
-
SAR
public static final CurrencyCode SAR
-
SBD
public static final CurrencyCode SBD
-
SCR
public static final CurrencyCode SCR
-
SDG
public static final CurrencyCode SDG
-
SEK
public static final CurrencyCode SEK
-
SGD
public static final CurrencyCode SGD
-
SHP
public static final CurrencyCode SHP
Saint Helena Pound [numeric code = 654, minor unit = 2]Used by:
SH
: SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA
-
SLL
public static final CurrencyCode SLL
-
SOS
public static final CurrencyCode SOS
-
SRD
public static final CurrencyCode SRD
-
SSP
public static final CurrencyCode SSP
-
STD
public static final CurrencyCode STD
Deprecated.- See Also:
STN
-
STN
public static final CurrencyCode STN
Dobra [numeric code = 930, minor unit = 2]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.
- Since:
- 1.23
- See Also:
STD
, ISO 4217 AMENDMENT NUMBER 164
-
SVC
public static final CurrencyCode SVC
-
SYP
public static final CurrencyCode SYP
-
SZL
public static final CurrencyCode SZL
-
THB
public static final CurrencyCode THB
-
TJS
public static final CurrencyCode TJS
-
TMT
public static final CurrencyCode TMT
-
TND
public static final CurrencyCode TND
-
TOP
public static final CurrencyCode TOP
-
TRY
public static final CurrencyCode TRY
-
TTD
public static final CurrencyCode TTD
-
TWD
public static final CurrencyCode TWD
-
TZS
public static final CurrencyCode TZS
-
UAH
public static final CurrencyCode UAH
-
UGX
public static final CurrencyCode UGX
-
USD
public static final CurrencyCode USD
US Dollar [numeric code = 840, minor unit = 2]Used by:
AS
: AMERICAN SAMOABQ
: BONAIRE, SINT EUSTATIUS AND SABAEC
: ECUADORFM
: MICRONESIA, FEDERATED STATES OFGU
: GUAMHT
: HAITIIO
: BRITISH INDIAN OCEAN TERRITORYMH
: MARSHALL ISLANDSMP
: NORTHERN MARIANA ISLANDSPA
: PANAMAPR
: PUERTO RICOPW
: PALAUSV
: EL SALVADORTC
: TURKS AND CAICOS ISLANDSTL
: TIMOR-LESTEUM
: UNITED STATES MINOR OUTLYING ISLANDSUS
: UNITED STATESVG
: VIRGIN ISLANDS (BRITISH)VI
: VIRGIN ISLANDS (US)
-
USN
public static final CurrencyCode USN
US Dollar (Next day) [numeric code = 997, minor unit = 2, fund]Used by:
US
: UNITED STATES
-
USS
public static final CurrencyCode USS
US Dollar (Same day) [numeric code = 998, minor unit = 2, fund]Used by:
US
: UNITED STATES
-
UYI
public static final CurrencyCode UYI
Uruguay Peso en Unidades Indexadas (URUIURUI) [numeric code = 940, minor unit = 0, fund]Used by:
UY
: URUGUAY
-
UYU
public static final CurrencyCode UYU
-
UZS
public static final CurrencyCode UZS
-
VEF
public static final CurrencyCode VEF
Deprecated.- See Also:
VES
-
VES
public static final CurrencyCode VES
- See Also:
VEF
-
VND
public static final CurrencyCode VND
-
VUV
public static final CurrencyCode VUV
-
WST
public static final CurrencyCode WST
-
XAF
public static final CurrencyCode XAF
-
XAG
public static final CurrencyCode XAG
Silver [numeric code = 961, minor unit = -1, precious metal]
-
XAU
public static final CurrencyCode XAU
Gold [numeric code = 959, minor unit = -1, precious metal]
-
XBA
public static final CurrencyCode XBA
Bond Markets Unit European Composite Unit (EURCO) [numeric code = 955, minor unit = -1]
-
XBB
public static final CurrencyCode XBB
Bond Markets Unit European Monetary Unit (E.M.U.-6) [numeric code = 956, minor unit = -1]
-
XBC
public static final CurrencyCode XBC
Bond Markets Unit European Unit of Account 9 (E.U.A.-9) [numeric code = 957, minor unit = -1]
-
XBD
public static final CurrencyCode XBD
Bond Markets Unit European Unit of Account 17 (E.U.A.-17) [numeric code = 958, minor unit = -1]
-
XCD
public static final CurrencyCode XCD
-
XDR
public static final CurrencyCode XDR
SDR (Special Drawing Right) [numeric code = 960, minor unit = -1]
-
XOF
public static final CurrencyCode XOF
-
XPD
public static final CurrencyCode XPD
Palladium [numeric code = 964, minor unit = -1, precious metal]
-
XPF
public static final CurrencyCode XPF
-
XPT
public static final CurrencyCode XPT
Platinum [numeric code = 962, minor unit = -1, precious metal]
-
XSU
public static final CurrencyCode XSU
Sucre [numeric code = 994, minor unit = -1]
-
XTS
public static final CurrencyCode XTS
Codes specifically reserved for testing purposes. [numeric code = 963, minor unit = -1]
-
XUA
public static final CurrencyCode XUA
ADB Unit of Account [numeric code = 965, minor unit = -1]
-
XXX
public static final CurrencyCode XXX
The codes assigned for transactions where no currency is involved [numeric code = 999, minor unit = -1]
-
YER
public static final CurrencyCode YER
-
ZAR
public static final CurrencyCode ZAR
-
ZMW
public static final CurrencyCode ZMW
-
ZWL
public static final CurrencyCode ZWL
-
-
Field Detail
-
numericMap
private static final java.util.Map<java.lang.Integer,CurrencyCode> numericMap
-
name
private final java.lang.String name
-
numeric
private final int numeric
-
minorUnit
private final int minorUnit
-
countryList
private final java.util.List<CountryCode> countryList
-
-
Constructor Detail
-
CurrencyCode
private CurrencyCode(java.lang.String name, int numeric, int minorUnit, CountryCode... countries)
-
-
Method Detail
-
values
public static CurrencyCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CurrencyCode c : CurrencyCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CurrencyCode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
public java.lang.String getName()
Get the currency name.- Returns:
- The currency name.
-
getNumeric
public int getNumeric()
Get the ISO 4217 numeric code.- Returns:
- The ISO 4217 numeric code.
-
getMinorUnit
public int getMinorUnit()
Get the minor unit.- Returns:
- The minor unit.
-1
means N.A.
-
getCountryList
public java.util.List<CountryCode> getCountryList()
Get the list of countries using this currency.- Returns:
- The list of countries using this currency.
-
isFund
public boolean isFund()
Check if this currency code represents a fund.CurrencyCode
instances listed below returntrue
.- Returns:
- True if this currency code represents a fund.
-
isPreciousMetal
public boolean isPreciousMetal()
Check if this currency code represents a precious metal.CurrencyCode
instances listed below returntrue
.- Returns:
- True if this currency code represents a precious metal.
-
getCurrency
public java.util.Currency getCurrency()
Get theCurrency
instance that corresponds to this currency code.This method is an alias of
Currency
.
getInstance
(this.name())
. The only difference is that this method returnsnull
whenCurrency.getInstance(String)
throwsIllegalArgumentException
.- Returns:
- A
Currency
instance, ornull
if this ISO 4217 code is not supported by the implementation ofCurrency.getInstance(String)
. - See Also:
Currency.getInstance(String)
-
getByCode
public static CurrencyCode getByCode(java.lang.String code)
Get aCurrencyCode
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 ofgetByCode(code, false)
.- Parameters:
code
- ISO 4217 alpha-3 code. When"UNDEFINED"
is given,CurrencyCode.UNDEFINED
is returned.- Returns:
- A
CurrencyCode
instance, ornull
if not found. - See Also:
getByCode(String, boolean)
-
getByCodeIgnoreCase
public static CurrencyCode getByCodeIgnoreCase(java.lang.String code)
Get aCurrencyCode
that corresponds to the given ISO 4217 alpha-3 code.This method calls
getByCode
(code, false)
.- Parameters:
code
- ISO 4217 alpha-3 code. Or"UNDEFINED"
(case insensitive).- Returns:
- A
CurrencyCode
instance, ornull
if not found. - Since:
- 1.13
- See Also:
getByCode(String, boolean)
-
getByCode
public static CurrencyCode getByCode(java.lang.String code, boolean caseSensitive)
Get aCurrencyCode
that corresponds to the given ISO 4217 alpha-3 code.- Parameters:
code
- ISO 4217 alpha-3 code. Or"UNDEFINED"
(its case sensitivity depends on the value ofcaseSensitive
).caseSensitive
- Iftrue
, the given code should consist of upper-case letters only. Iffalse
, this method internally canonicalizes the given code byString.toUpperCase()
and then performs search. For example,getByCode("jpy", true)
returnsnull
, but on the other hand,getByCode("jpy", false)
returnsCurrencyCode.JPY
.- Returns:
- A
CurrencyCode
instance, ornull
if not found.
-
getByCode
public static CurrencyCode getByCode(int code)
Get aCurrencyCode
that corresponds to the given ISO 4217 numeric code.- Parameters:
code
- ISO 4217 numeric code.- Returns:
- A
CurrencyCode
instance, ornull
if not found. If 0 or a negative value is given,null
is returned.
-
canonicalize
private static java.lang.String canonicalize(java.lang.String code, boolean caseSensitive)
-
getByCountry
public static java.util.List<CurrencyCode> getByCountry(java.lang.String country)
Get a list ofCurrencyCode
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 ofgetByCountry(code, false)
.- Parameters:
country
- Country code. ISO 3166-1 alpha-2 or alpha-3.- Returns:
- List of
CurrencyCode
instances. If there is noCurrencyCode
instance whose country list contains the specified country, the size of the returned list is zero.
-
getByCountryIgnoreCase
public static java.util.List<CurrencyCode> getByCountryIgnoreCase(java.lang.String country)
Get a list ofCurrencyCode
instances whose country list contains the specified country.This method is an alias of
getByCountry
(country, false)
.- Parameters:
country
- Country code. ISO 3166-1 alpha-2 or alpha-3.- Returns:
- List of
CurrencyCode
instances. If there is noCurrencyCode
instance whose country list contains the specified country, the size of the returned list is zero. - Since:
- 1.13
-
getByCountry
public static java.util.List<CurrencyCode> getByCountry(java.lang.String country, boolean caseSensitive)
Get a list ofCurrencyCode
instances whose country list contains the specified country.This method is an alias of
getByCountry
(
CountryCode
.
getByCode
(country, caseSensitive))
.- Parameters:
country
- Country code. ISO 3166-1 alpha-2 or alpha-3.caseSensitive
- Iftrue
, the given code should consist of uppercase letters only. Iffalse
, case is ignored.- Returns:
- List of
CurrencyCode
instances. If there is noCurrencyCode
instance whose country list contains the specified country, the size of the returned list is zero.
-
getByCountry
public static java.util.List<CurrencyCode> getByCountry(CountryCode country)
Get a list ofCurrencyCode
instances whose country list contains the specified country.- Parameters:
country
-CountryCode
instance that represents a country.- Returns:
- List of
CurrencyCode
instances. If there is noCurrencyCode
instance whose country list contains the specified country, the size of the returned list is zero.
-
findByName
public static java.util.List<CurrencyCode> findByName(java.lang.String regex)
Get a list ofCurrencyCode
by a name regular expression.This method is almost equivalent to
findByName
(Pattern.compile(regex))
.- Parameters:
regex
- Regular expression for names.- Returns:
- List of
CurrencyCode
. If nothing has matched, an empty list is returned. - Throws:
java.lang.IllegalArgumentException
-regex
isnull
.java.util.regex.PatternSyntaxException
-regex
failed to be compiled.- Since:
- 1.11
-
findByName
public static java.util.List<CurrencyCode> findByName(java.util.regex.Pattern pattern)
Get a list ofCurrencyCode
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.- Parameters:
pattern
- Pattern to match names.- Returns:
- List of
CurrencyCde
. If nothing has matched, an empty list is returned. - Throws:
java.lang.IllegalArgumentException
-pattern
isnull
.- Since:
- 1.11
-
-