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.
| Modifier and Type | Method and Description |
|---|---|
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 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. |
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 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 BYR
public static final CurrencyCode BZD
public static final CurrencyCode CAD
public static final CurrencyCode CDF
Used by:
CD: CONGO, THE DEMOCRATIC REPUBLIC OF
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
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)
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
public 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
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
public 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
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)
This method calls getByCode(code, false), meaning the case of the given
code is ignored.
code - ISO 4217
alpha-3 code.getByCode(String, boolean)public static CurrencyCode getByCode(String code, boolean caseSensitive)
code - ISO 4217
alpha-3 code.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.public static CurrencyCode getByCode(int code)
code - ISO 4217
numeric code.public static List<CurrencyCode> getByCountry(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.Copyright © 2014. All rights reserved.