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 AEDUAE Dirham [numeric code = 784, minor unit = 2]AFNAfghani [numeric code = 971, minor unit = 2]ALLLek [numeric code = 8, minor unit = 2]AMDArmenian Dram [numeric code = 51, minor unit = 2]ANGNetherlands Antillean Guilder [numeric code = 532, minor unit = 2]AOAKwanza [numeric code = 973, minor unit = 2]ARSArgentine Peso [numeric code = 32, minor unit = 2]AUDAustralian Dollar [numeric code = 36, minor unit = 2]AWGAruban Florin [numeric code = 533, minor unit = 2]AZNAzerbaijanian Manat [numeric code = 944, minor unit = 2]BAMConvertible Mark [numeric code = 977, minor unit = 2]BBDBarbados Dollar [numeric code = 52, minor unit = 2]BDTTaka [numeric code = 50, minor unit = 2]BGNBulgarian Lev [numeric code = 975, minor unit = 2]BHDBahraini Dinar [numeric code = 48, minor unit = 3]BIFBurundi Franc [numeric code = 108, minor unit = 0]BMDBermudian Dollar [numeric code = 60, minor unit = 2]BNDBrunei Dollar [numeric code = 96, minor unit = 2]BOBBoliviano [numeric code = 68, minor unit = 2]BOVMvdol [numeric code = 984, minor unit = 2, fund]BRLBrazilian Real [numeric code = 986, minor unit = 2]BSDBahamian Dollar [numeric code = 44, minor unit = 2]BTNNgultrum [numeric code = 64, minor unit = 2]BWPPula [numeric code = 72, minor unit = 2]BYNBelarusian Ruble [numeric code = 933, minor unit = 2]BYRDeprecated.BZDBelize Dollar [numeric code = 84, minor unit = 2]CADCanadian Dollar [numeric code = 124, minor unit = 2]CDFCongolese Franc [numeric code = 976, minor unit = 2]CHEWIR Euro [numeric code = 947, minor unit = 2, fund]CHFSwiss Franc [numeric code = 756, minor unit = 2]CHWWIR Franc [numeric code = 948, minor unit = 2, fund]CLFUnidad de Fomento [numeric code = 990, minor unit = 0, fund]CLPChilean Peso [numeric code = 152, minor unit = 0]CNYYuan Renminbi [numeric code = 156, minor unit = 2]COPColombian Peso [numeric code = 170, minor unit = 2]COUUnidad de Valor Real [numeric code = 970, minor unit = 2, fund]CRCCosta Rican Colon [numeric code = 188, minor unit = 2]CUCPeso Convertible [numeric code = 931, minor unit = 2]CUPCuban Peso [numeric code = 192, minor unit = 2]CVECape Verde Escudo [numeric code = 132, minor unit = 2]CZKCzech Koruna [numeric code = 203, minor unit = 2]DJFDjibouti Franc [numeric code = 262, minor unit = 0]DKKDanish Krone [numeric code = 208, minor unit = 2]DOPDominican Peso [numeric code = 214, minor unit = 2]DZDAlgerian Dinar [numeric code = 12, minor unit = 2]EGPEgyptian Pound [numeric code = 818, minor unit = 2]ERNNakfa [numeric code = 232, minor unit = 2]ETBEthiopian Birr [numeric code = 230, minor unit = 2]EUREuro [numeric code = 978, minor unit = 2]FJDFiji Dollar [numeric code = 242, minor unit = 2]FKPFalkland Islands Pound [numeric code = 238, minor unit = 2]GBPPound Sterling [numeric code = 826, minor unit = 2]GELLari [numeric code = 981, minor unit = 2]GHSGhana Cedi [numeric code = 936, minor unit = 2]GIPGibraltar Pound [numeric code = 292, minor unit = 2]GMDDalasi [numeric code = 270, minor unit = 2]GNFGuinea Franc [numeric code = 324, minor unit = 0]GTQQuetzal [numeric code = 320, minor unit = 2]GYDGuyana Dollar [numeric code = 328, minor unit = 2]HKDHong Kong Dollar [numeric code = 344, minor unit = 2]HNLLempira [numeric code = 340, minor unit = 2]HRKCroatian Kuna [numeric code = 191, minor unit = 2]HTGGourde [numeric code = 332, minor unit = 2]HUFForint [numeric code = 348, minor unit = 2]IDRRupiah [numeric code = 360, minor unit = 2]ILSNew Israeli Sheqel [numeric code = 376, minor unit = 2]INRIndian Rupee [numeric code = 356, minor unit = 2]IQDIraqi Dinar [numeric code = 368, minor unit = 3]IRRIranian Rial [numeric code = 364, minor unit = 2]ISKIceland Krona [numeric code = 352, minor unit = 0]JMDJamaican Dollar [numeric code = 388, minor unit = 2]JODJordanian Dinar [numeric code = 400, minor unit = 3]JPYYen [numeric code = 392, minor unit = 0]KESKenyan Shilling [numeric code = 404, minor unit = 2]KGSSom [numeric code = 417, minor unit = 2]KHRRiel [numeric code = 116, minor unit = 2]KMFComoro Franc [numeric code = 174, minor unit = 0]KPWNorth Korean Won [numeric code = 408, minor unit = 2]KRWWon [numeric code = 410, minor unit = 0]KWDKuwaiti Dinar [numeric code = 414, minor unit = 3]KYDCayman Islands Dollar [numeric code = 136, minor unit = 2]KZTTenge [numeric code = 398, minor unit = 2]LAKKip [numeric code = 418, minor unit = 2]LBPLebanese Pound [numeric code = 422, minor unit = 2]LKRSri Lanka Rupee [numeric code = 144, minor unit = 2]LRDLiberian Dollar [numeric code = 430, minor unit = 2]LSLLoti [numeric code = 426, minor unit = 2]LTLDeprecated.LYDLibyan Dinar [numeric code = 434, minor unit = 3]MADMoroccan Dirham [numeric code = 504, minor unit = 2]MDLMoldovan Leu [numeric code = 498, minor unit = 2]MGAMalagasy Ariary [numeric code = 969, minor unit = 2]MKDDenar [numeric code = 807, minor unit = 2]MMKKyat [numeric code = 104, minor unit = 2]MNTTugrik [numeric code = 496, minor unit = 2]MOPPataca [numeric code = 446, minor unit = 2]MRODeprecated.MRUOuguiya [numeric code = 929, minor unit = 2]MURMauritius Rupee [numeric code = 480, minor unit = 2]MVRRufiyaa [numeric code = 462, minor unit = 2]MWKKwacha [numeric code = 454, minor unit = 2]MXNMexican Peso [numeric code = 484, minor unit = 2]MXVMexican Unidad de Inversion (UDI) [numeric code = 979, minor unit = 2, fund]MYRMalaysian Ringgit [numeric code = 458, minor unit = 2]MZNMozambique Metical [numeric code = 943, minor unit = 2]NADNamibia Dollar [numeric code = 516, minor unit = 2]NGNNaira [numeric code = 566, minor unit = 2]NIOCordoba Oro [numeric code = 558, minor unit = 2]NOKNorwegian Krone [numeric code = 578, minor unit = 2]NPRNepalese Rupee [numeric code = 524, minor unit = 2]NZDNew Zealand Dollar [numeric code = 554, minor unit = 2]OMRRial Omani [numeric code = 512, minor unit = 3]PABBalboa [numeric code = 590, minor unit = 2]PENNuevo Sol [numeric code = 604, minor unit = 2]PGKKina [numeric code = 598, minor unit = 2]PHPPhilippine Peso [numeric code = 608, minor unit = 2]PKRPakistan Rupee [numeric code = 586, minor unit = 2]PLNZloty [numeric code = 985, minor unit = 2]PYGGuarani [numeric code = 600, minor unit = 0]QARQatari Rial [numeric code = 634, minor unit = 2]RONNew Romanian Leu [numeric code = 946, minor unit = 2]RSDSerbian Dinar [numeric code = 941, minor unit = 2]RUBRussian Ruble [numeric code = 643, minor unit = 2]RURDeprecated.RWFRwanda Franc [numeric code = 646, minor unit = 0]SARSaudi Riyal [numeric code = 682, minor unit = 2]SBDSolomon Islands Dollar [numeric code = 90, minor unit = 2]SCRSeychelles Rupee [numeric code = 690, minor unit = 2]SDGSudanese Pound [numeric code = 938, minor unit = 2]SEKSwedish Krona [numeric code = 752, minor unit = 2]SGDSingapore Dollar [numeric code = 702, minor unit = 2]SHPSaint Helena Pound [numeric code = 654, minor unit = 2]SLLLeone [numeric code = 694, minor unit = 2]SOSSomali Shilling [numeric code = 706, minor unit = 2]SRDSurinam Dollar [numeric code = 968, minor unit = 2]SSPSouth Sudanese Pound [numeric code = 728, minor unit = 2]STDDeprecated.STNDobra [numeric code = 930, minor unit = 2]SVCEl Salvador Colon [numeric code = 222, minor unit = 2]SYPSyrian Pound [numeric code = 760, minor unit = 2]SZLLilangeni [numeric code = 748, minor unit = 2]THBBaht [numeric code = 764, minor unit = 2]TJSSomoni [numeric code = 972, minor unit = 2]TMTTurkmenistan New Manat [numeric code = 934, minor unit = 2]TNDTunisian Dinar [numeric code = 788, minor unit = 3]TOPPaʻanga [numeric code = 776, minor unit = 2]TRYTurkish Lira [numeric code = 949, minor unit = 2]TTDTrinidad and Tobago Dollar [numeric code = 780, minor unit = 2]TWDNew Taiwan Dollar [numeric code = 901, minor unit = 2]TZSTanzanian Shilling [numeric code = 834, minor unit = 2]UAHHryvnia [numeric code = 980, minor unit = 2]UGXUganda Shilling [numeric code = 800, minor unit = 0]UNDEFINEDUndefined.USDUS Dollar [numeric code = 840, minor unit = 2]USNUS Dollar (Next day) [numeric code = 997, minor unit = 2, fund]USSUS Dollar (Same day) [numeric code = 998, minor unit = 2, fund]UYIUruguay Peso en Unidades Indexadas (URUIURUI) [numeric code = 940, minor unit = 0, fund]UYUPeso Uruguayo [numeric code = 858, minor unit = 2]UZSUzbekistan Sum [numeric code = 860, minor unit = 2]VEFDeprecated.VESBolivar [numeric code = 928, minor unit = 2]VNDDong [numeric code = 704, minor unit = 0]VUVVatu [numeric code = 548, minor unit = 0]WSTTala [numeric code = 882, minor unit = 2]XAFCFA Franc BEAC [numeric code = 950, minor unit = 0]XAGSilver [numeric code = 961, minor unit = -1, precious metal]XAUGold [numeric code = 959, minor unit = -1, precious metal]XBABond Markets Unit European Composite Unit (EURCO) [numeric code = 955, minor unit = -1]XBBBond Markets Unit European Monetary Unit (E.M.U.-6) [numeric code = 956, minor unit = -1]XBCBond Markets Unit European Unit of Account 9 (E.U.A.-9) [numeric code = 957, minor unit = -1]XBDBond Markets Unit European Unit of Account 17 (E.U.A.-17) [numeric code = 958, minor unit = -1]XCDEast Caribbean Dollar [numeric code = 951, minor unit = 2]XDRSDR (Special Drawing Right) [numeric code = 960, minor unit = -1]XOFCFA Franc BCEAO [numeric code = 952, minor unit = 0]XPDPalladium [numeric code = 964, minor unit = -1, precious metal]XPFCFP Franc [numeric code = 953, minor unit = 0]XPTPlatinum [numeric code = 962, minor unit = -1, precious metal]XSUSucre [numeric code = 994, minor unit = -1]XTSCodes specifically reserved for testing purposes.XUAADB Unit of Account [numeric code = 965, minor unit = -1]XXXThe codes assigned for transactions where no currency is involved [numeric code = 999, minor unit = -1]YERYemeni Rial [numeric code = 886, minor unit = 2]ZARRand [numeric code = 710, minor unit = 2]ZMWZambian Kwacha [numeric code = 967, minor unit = 2]ZWLZimbabwe Dollar [numeric code = 932, minor unit = 2]
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<CountryCode>countryListprivate intminorUnitprivate java.lang.Stringnameprivate intnumericprivate static java.util.Map<java.lang.Integer,CurrencyCode>numericMap
-
Constructor Summary
Constructors Modifier Constructor Description privateCurrencyCode(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.Stringcanonicalize(java.lang.String code, boolean caseSensitive)static java.util.List<CurrencyCode>findByName(java.lang.String regex)Get a list ofCurrencyCodeby a name regular expression.static java.util.List<CurrencyCode>findByName(java.util.regex.Pattern pattern)Get a list ofCurrencyCodeby a name pattern.static CurrencyCodegetByCode(int code)Get aCurrencyCodethat corresponds to the given ISO 4217 numeric code.static CurrencyCodegetByCode(java.lang.String code)Get aCurrencyCodethat corresponds to the given ISO 4217 alpha-3 code.static CurrencyCodegetByCode(java.lang.String code, boolean caseSensitive)Get aCurrencyCodethat corresponds to the given ISO 4217 alpha-3 code.static CurrencyCodegetByCodeIgnoreCase(java.lang.String code)Get aCurrencyCodethat corresponds to the given ISO 4217 alpha-3 code.static java.util.List<CurrencyCode>getByCountry(CountryCode country)Get a list ofCurrencyCodeinstances whose country list contains the specified country.static java.util.List<CurrencyCode>getByCountry(java.lang.String country)Get a list ofCurrencyCodeinstances whose country list contains the specified country.static java.util.List<CurrencyCode>getByCountry(java.lang.String country, boolean caseSensitive)Get a list ofCurrencyCodeinstances whose country list contains the specified country.static java.util.List<CurrencyCode>getByCountryIgnoreCase(java.lang.String country)Get a list ofCurrencyCodeinstances whose country list contains the specified country.java.util.List<CountryCode>getCountryList()Get the list of countries using this currency.java.util.CurrencygetCurrency()Get theCurrencyinstance that corresponds to this currency code.intgetMinorUnit()Get the minor unit.java.lang.StringgetName()Get the currency name.intgetNumeric()Get the ISO 4217 numeric code.booleanisFund()Check if this currency code represents a fund.booleanisPreciousMetal()Check if this currency code represents a precious metal.static CurrencyCodevalueOf(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.
-1means 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.CurrencyCodeinstances 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.CurrencyCodeinstances listed below returntrue.- Returns:
- True if this currency code represents a precious metal.
-
getCurrency
public java.util.Currency getCurrency()
Get theCurrencyinstance that corresponds to this currency code.This method is an alias of
Currency.getInstance(this.name()). The only difference is that this method returnsnullwhenCurrency.getInstance(String)throwsIllegalArgumentException.- Returns:
- A
Currencyinstance, ornullif 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 aCurrencyCodethat 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.UNDEFINEDis returned.- Returns:
- A
CurrencyCodeinstance, ornullif not found. - See Also:
getByCode(String, boolean)
-
getByCodeIgnoreCase
public static CurrencyCode getByCodeIgnoreCase(java.lang.String code)
Get aCurrencyCodethat 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
CurrencyCodeinstance, ornullif not found. - Since:
- 1.13
- See Also:
getByCode(String, boolean)
-
getByCode
public static CurrencyCode getByCode(java.lang.String code, boolean caseSensitive)
Get aCurrencyCodethat 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
CurrencyCodeinstance, ornullif not found.
-
getByCode
public static CurrencyCode getByCode(int code)
Get aCurrencyCodethat corresponds to the given ISO 4217 numeric code.- Parameters:
code- ISO 4217 numeric code.- Returns:
- A
CurrencyCodeinstance, ornullif not found. If 0 or a negative value is given,nullis 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 ofCurrencyCodeinstances 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
CurrencyCodeinstances. If there is noCurrencyCodeinstance 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 ofCurrencyCodeinstances 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
CurrencyCodeinstances. If there is noCurrencyCodeinstance 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 ofCurrencyCodeinstances 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
CurrencyCodeinstances. If there is noCurrencyCodeinstance 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 ofCurrencyCodeinstances whose country list contains the specified country.- Parameters:
country-CountryCodeinstance that represents a country.- Returns:
- List of
CurrencyCodeinstances. If there is noCurrencyCodeinstance 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 ofCurrencyCodeby 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-regexisnull.java.util.regex.PatternSyntaxException-regexfailed to be compiled.- Since:
- 1.11
-
findByName
public static java.util.List<CurrencyCode> findByName(java.util.regex.Pattern pattern)
Get a list ofCurrencyCodeby 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
CurrencyCodes 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-patternisnull.- Since:
- 1.11
-
-