public enum ISOCountryCode extends Enum<ISOCountryCode> implements CountryCode
The Enum names of this enumeration themselves are represented by
ISO 3166-1 alpha-2
codes.
Instance methods return country name (getName()),
ISO 3166-1 alpha-3 codes (getAlpha3Code()
),
ISO 3166-1 numericCode codes (getNumericCode()
),
and E.164 the dialling region code (getDiallingRegionCode()
)
Static factory methods can retrieve ISOCountryCode instances that
corresponds to a given code.
To update this class, populate using countrynames.txt, downloadable from OpenGeoCode. For the purpose of FMPP, all but one line of header must be removed.
Enum Constant and Description |
---|
AD |
AE |
AF |
AG |
AI |
AL |
AM |
AO |
AQ |
AR |
AS |
AT |
AU |
AW |
AX |
AZ |
BA |
BB |
BD |
BE |
BF |
BG |
BH |
BI |
BJ |
BL |
BM |
BN |
BO |
BQ |
BR |
BS |
BT |
BV |
BW |
BY |
BZ |
CA |
CC |
CD |
CF |
CG |
CH |
CI |
CK |
CL |
CM |
CN |
CO |
CR |
CU |
CV |
CW |
CX |
CY |
CZ |
DE |
DJ |
DK |
DM |
DO |
DZ |
EC |
EE |
EG |
EH |
ER |
ES |
ET |
FI |
FJ |
FK |
FM |
FO |
FR |
GA |
GB |
GD |
GE |
GF |
GG |
GH |
GI |
GL |
GM |
GN |
GP |
GQ |
GR |
GS |
GT |
GU |
GW |
GY |
HK |
HM |
HN |
HR |
HT |
HU |
ID |
IE |
IL |
IM |
IN |
IO |
IQ |
IR |
IS |
IT |
JE |
JM |
JO |
JP |
KE |
KG |
KH |
KI |
KM |
KN |
KP |
KR |
KW |
KY |
KZ |
LA |
LB |
LC |
LI |
LK |
LR |
LS |
LT |
LU |
LV |
LY |
MA |
MC |
MD |
ME |
MF |
MG |
MH |
MK |
ML |
MM |
MN |
MO |
MP |
MQ |
MR |
MS |
MT |
MU |
MV |
MW |
MX |
MY |
MZ |
NA |
NC |
NE |
NF |
NG |
NI |
NL |
NO |
NP |
NR |
NU |
NZ |
OM |
PA |
PE |
PF |
PG |
PH |
PK |
PL |
PM |
PN |
PR |
PS |
PT |
PW |
PY |
QA |
RE |
RO |
RS |
RU |
RW |
SA |
SB |
SC |
SD |
SE |
SG |
SH |
SI |
SJ |
SK |
SL |
SM |
SN |
SO |
SR |
SS |
ST |
SV |
SX |
SY |
SZ |
TC |
TD |
TF |
TG |
TH |
TJ |
TK |
TL |
TM |
TN |
TO |
TR |
TT |
TV |
TW |
TZ |
UA |
UG |
UM |
US |
UY |
UZ |
VA |
VC |
VE |
VG |
VI |
VN |
VU |
WF |
WS |
YE |
YT |
ZA |
ZM |
ZW |
Modifier and Type | Method and Description |
---|---|
String |
getAlpha2Code()
Get the ISO 3166-1 alpha-2 code.
|
String |
getAlpha3Code()
Get the ISO 3166-1 alpha-3 code.
|
static ISOCountryCode |
getByAlpha2Code(String code)
Get a CountryCode that corresponds to a given ISO 3166-1 alpha-2 code.
|
static ISOCountryCode |
getByAlpha3Code(String code)
Get a CountryCode that corresponds to a given ISO 3166-1 alpha-3 code.
|
static ISOCountryCode |
getByCode(String code)
|
static ISOCountryCode |
getByDiallingRegionCode(Integer code)
Get a CountryCode that corresponds to a given Dialling Region code.
|
static ISOCountryCode |
getByNumericCode(Integer code)
Get a CountryCode that corresponds to a given ISO 3166-1
numericCode code.
|
String |
getCountryName()
Get the country name.
|
Integer |
getDiallingRegionCode()
Gets the International Direct Dial prefix for the country
|
Integer |
getNumericCode()
Get the ISO 3166-1 numericCode code.
|
static ISOCountryCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ISOCountryCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ISOCountryCode AF
public static final ISOCountryCode AX
public static final ISOCountryCode AL
public static final ISOCountryCode DZ
public static final ISOCountryCode AS
public static final ISOCountryCode AD
public static final ISOCountryCode AO
public static final ISOCountryCode AI
public static final ISOCountryCode AQ
public static final ISOCountryCode AG
public static final ISOCountryCode AR
public static final ISOCountryCode AM
public static final ISOCountryCode AW
public static final ISOCountryCode AU
public static final ISOCountryCode AT
public static final ISOCountryCode AZ
public static final ISOCountryCode BS
public static final ISOCountryCode BH
public static final ISOCountryCode BD
public static final ISOCountryCode BB
public static final ISOCountryCode BY
public static final ISOCountryCode BE
public static final ISOCountryCode BZ
public static final ISOCountryCode BJ
public static final ISOCountryCode BM
public static final ISOCountryCode BT
public static final ISOCountryCode BO
public static final ISOCountryCode BQ
public static final ISOCountryCode BA
public static final ISOCountryCode BW
public static final ISOCountryCode BV
public static final ISOCountryCode BR
public static final ISOCountryCode IO
public static final ISOCountryCode BN
public static final ISOCountryCode BG
public static final ISOCountryCode BF
public static final ISOCountryCode BI
public static final ISOCountryCode KH
public static final ISOCountryCode CM
public static final ISOCountryCode CA
public static final ISOCountryCode CV
public static final ISOCountryCode KY
public static final ISOCountryCode CF
public static final ISOCountryCode TD
public static final ISOCountryCode CL
public static final ISOCountryCode CN
public static final ISOCountryCode CX
public static final ISOCountryCode CC
public static final ISOCountryCode CO
public static final ISOCountryCode KM
public static final ISOCountryCode CG
public static final ISOCountryCode CD
public static final ISOCountryCode CK
public static final ISOCountryCode CR
public static final ISOCountryCode CI
public static final ISOCountryCode HR
public static final ISOCountryCode CU
public static final ISOCountryCode CW
public static final ISOCountryCode CY
public static final ISOCountryCode CZ
public static final ISOCountryCode DK
public static final ISOCountryCode DJ
public static final ISOCountryCode DM
public static final ISOCountryCode DO
public static final ISOCountryCode EC
public static final ISOCountryCode EG
public static final ISOCountryCode SV
public static final ISOCountryCode GQ
public static final ISOCountryCode ER
public static final ISOCountryCode EE
public static final ISOCountryCode ET
public static final ISOCountryCode FK
public static final ISOCountryCode FO
public static final ISOCountryCode FJ
public static final ISOCountryCode FI
public static final ISOCountryCode FR
public static final ISOCountryCode GF
public static final ISOCountryCode PF
public static final ISOCountryCode TF
public static final ISOCountryCode GA
public static final ISOCountryCode GM
public static final ISOCountryCode GE
public static final ISOCountryCode DE
public static final ISOCountryCode GH
public static final ISOCountryCode GI
public static final ISOCountryCode GR
public static final ISOCountryCode GL
public static final ISOCountryCode GD
public static final ISOCountryCode GP
public static final ISOCountryCode GU
public static final ISOCountryCode GT
public static final ISOCountryCode GG
public static final ISOCountryCode GN
public static final ISOCountryCode GW
public static final ISOCountryCode GY
public static final ISOCountryCode HT
public static final ISOCountryCode HM
public static final ISOCountryCode VA
public static final ISOCountryCode HN
public static final ISOCountryCode HK
public static final ISOCountryCode HU
public static final ISOCountryCode IS
public static final ISOCountryCode IN
public static final ISOCountryCode ID
public static final ISOCountryCode IR
public static final ISOCountryCode IQ
public static final ISOCountryCode IE
public static final ISOCountryCode IM
public static final ISOCountryCode IL
public static final ISOCountryCode IT
public static final ISOCountryCode JM
public static final ISOCountryCode JP
public static final ISOCountryCode JE
public static final ISOCountryCode JO
public static final ISOCountryCode KZ
public static final ISOCountryCode KE
public static final ISOCountryCode KI
public static final ISOCountryCode KP
public static final ISOCountryCode KR
public static final ISOCountryCode KW
public static final ISOCountryCode KG
public static final ISOCountryCode LA
public static final ISOCountryCode LV
public static final ISOCountryCode LB
public static final ISOCountryCode LS
public static final ISOCountryCode LR
public static final ISOCountryCode LY
public static final ISOCountryCode LI
public static final ISOCountryCode LT
public static final ISOCountryCode LU
public static final ISOCountryCode MO
public static final ISOCountryCode MK
public static final ISOCountryCode MG
public static final ISOCountryCode MW
public static final ISOCountryCode MY
public static final ISOCountryCode MV
public static final ISOCountryCode ML
public static final ISOCountryCode MT
public static final ISOCountryCode MH
public static final ISOCountryCode MQ
public static final ISOCountryCode MR
public static final ISOCountryCode MU
public static final ISOCountryCode YT
public static final ISOCountryCode MX
public static final ISOCountryCode FM
public static final ISOCountryCode MD
public static final ISOCountryCode MC
public static final ISOCountryCode MN
public static final ISOCountryCode ME
public static final ISOCountryCode MS
public static final ISOCountryCode MA
public static final ISOCountryCode MZ
public static final ISOCountryCode MM
public static final ISOCountryCode NA
public static final ISOCountryCode NR
public static final ISOCountryCode NP
public static final ISOCountryCode NL
public static final ISOCountryCode NC
public static final ISOCountryCode NZ
public static final ISOCountryCode NI
public static final ISOCountryCode NE
public static final ISOCountryCode NG
public static final ISOCountryCode NU
public static final ISOCountryCode NF
public static final ISOCountryCode MP
public static final ISOCountryCode NO
public static final ISOCountryCode PS
public static final ISOCountryCode OM
public static final ISOCountryCode PK
public static final ISOCountryCode PW
public static final ISOCountryCode PA
public static final ISOCountryCode PG
public static final ISOCountryCode PY
public static final ISOCountryCode PE
public static final ISOCountryCode PH
public static final ISOCountryCode PN
public static final ISOCountryCode PL
public static final ISOCountryCode PT
public static final ISOCountryCode PR
public static final ISOCountryCode QA
public static final ISOCountryCode RE
public static final ISOCountryCode RO
public static final ISOCountryCode RU
public static final ISOCountryCode RW
public static final ISOCountryCode BL
public static final ISOCountryCode SH
public static final ISOCountryCode KN
public static final ISOCountryCode LC
public static final ISOCountryCode MF
public static final ISOCountryCode PM
public static final ISOCountryCode VC
public static final ISOCountryCode WS
public static final ISOCountryCode SM
public static final ISOCountryCode ST
public static final ISOCountryCode SA
public static final ISOCountryCode SN
public static final ISOCountryCode RS
public static final ISOCountryCode SC
public static final ISOCountryCode SL
public static final ISOCountryCode SG
public static final ISOCountryCode SX
public static final ISOCountryCode SK
public static final ISOCountryCode SI
public static final ISOCountryCode SB
public static final ISOCountryCode SO
public static final ISOCountryCode ZA
public static final ISOCountryCode GS
public static final ISOCountryCode SS
public static final ISOCountryCode ES
public static final ISOCountryCode LK
public static final ISOCountryCode SD
public static final ISOCountryCode SR
public static final ISOCountryCode SJ
public static final ISOCountryCode SZ
public static final ISOCountryCode SE
public static final ISOCountryCode CH
public static final ISOCountryCode SY
public static final ISOCountryCode TW
public static final ISOCountryCode TJ
public static final ISOCountryCode TZ
public static final ISOCountryCode TH
public static final ISOCountryCode TL
public static final ISOCountryCode TG
public static final ISOCountryCode TK
public static final ISOCountryCode TO
public static final ISOCountryCode TT
public static final ISOCountryCode TN
public static final ISOCountryCode TR
public static final ISOCountryCode TM
public static final ISOCountryCode TC
public static final ISOCountryCode TV
public static final ISOCountryCode UG
public static final ISOCountryCode UA
public static final ISOCountryCode AE
public static final ISOCountryCode GB
public static final ISOCountryCode US
public static final ISOCountryCode UM
public static final ISOCountryCode UY
public static final ISOCountryCode UZ
public static final ISOCountryCode VU
public static final ISOCountryCode VE
public static final ISOCountryCode VN
public static final ISOCountryCode VG
public static final ISOCountryCode VI
public static final ISOCountryCode WF
public static final ISOCountryCode EH
public static final ISOCountryCode YE
public static final ISOCountryCode ZM
public static final ISOCountryCode ZW
public static ISOCountryCode[] values()
for (ISOCountryCode c : ISOCountryCode.values()) System.out.println(c);
public static ISOCountryCode 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 getCountryName()
getCountryName
in interface CountryCode
public String getAlpha2Code()
getAlpha2Code
in interface CountryCode
public String getAlpha3Code()
getAlpha3Code
in interface CountryCode
public Integer getNumericCode()
getNumericCode
in interface CountryCode
public Integer getDiallingRegionCode()
getDiallingRegionCode
in interface CountryCode
public static ISOCountryCode getByCode(String code)
public static ISOCountryCode getByAlpha2Code(String code)
code
- An ISO 3166-1 alpha-2.public static ISOCountryCode getByAlpha3Code(String code)
code
- An ISO 3166-1 alpha-3 code.public static ISOCountryCode getByNumericCode(Integer code)
code
- An ISO 3166-1 numericCode code.public static ISOCountryCode getByDiallingRegionCode(Integer code)
code
- An E.164 Dialling Region Code code.Copyright © 2010–2018 Jadira Systems. All rights reserved.