Enum Class Country
- All Implemented Interfaces:
Serializable
,Comparable<Country>
,Constable
An enumeration for all current ISO 3166-1 Alpha-2 and Alpha-3 country codes.
Formerly used codes are not included.
All unused user assigned codes (e.g. XX and QS) are mapped to the single enum USER_DEFINED.
Titles are taken from the ISO standard short name in all cases.
GBIF Regions are based on IPBES regions, also available as a CSV list.
The source for GBIF Regions is the participant entities in the GBIF Directory, which are synchronized with
Node
s in the Registry. They are also recorded here,
to provide regions for countries/territories that are not GBIF members.
The regions follow IPBES regions, except for Antarctic territories, as there was no IPBES report for these.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deserializes the value from a 2-letter ISO format.static class
Serializes the value in a 2-letter ISO format.static class
Deserializes the value from an English country title exactly as given by the enumeration.static class
Serializes the value as the English country title.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAfghanistan.Åland Islands.Albania.Algeria.American Samoa.Andorra.Angola.Anguilla.Antarctica.Antigua and Barbuda.Argentina.Armenia.Aruba.Australia.Austria.Azerbaijan.Bahamas.Bahrain.Bangladesh.Barbados.Belarus.Belgium.Belize.Benin.Bermuda.Bhutan.Bolivia (Plurinational State of).Bonaire, Sint Eustatius and Saba.Bosnia and Herzegovina.Botswana.Bouvet Island.Brazil.British Indian Ocean Territory.Brunei Darussalam.Bulgaria.Burkina Faso.Burundi.Cambodia.Cameroon.Canada.Cabo Verde.Cayman Islands.Central African Republic.Chad.Chile.China.Christmas Island.Cocos (Keeling) Islands.Colombia.Comoros.Congo, Republic of the.Congo, Democratic Republic of the.Cook Islands.Costa Rica.Côte d’Ivoire.Croatia.Cuba.Curaçao.Cyprus.Czechia.Denmark.Djibouti.Dominica.Dominican Republic.Ecuador.Egypt.El Salvador.Equatorial Guinea.Eritrea.Estonia.Ethiopia.Falkland Islands (Malvinas).Faroe Islands.Fiji.Finland.France.French Guiana.French Polynesia.French Southern Territories.Gabon.Gambia.Georgia.Germany.Ghana.Gibraltar.Greece.Greenland.Grenada.Guadeloupe.Guam.Guatemala.Guernsey.Guinea.Guinea-Bissau.Guyana.Haiti.Heard Island and McDonald Islands.Honduras.Hong Kong.Hungary.Iceland.India.Indonesia.Taken from {@link <a href="https://en.wikipedia.org/wiki/UN/LOCODE">UN/LOCODE</a>}Iran (Islamic Republic of).Iraq.Ireland.Isle of Man.Israel.Italy.Jamaica.Japan.Jersey.Jordan.Kazakhstan.Kenya.Kiribati.Korea (Democratic People’s Republic of).Korea, Republic of.Kosovo.Kuwait.Kyrgyzstan.Lao People’s Democratic Republic.Latvia.Lebanon.Lesotho.Liberia.Libya.Liechtenstein.Lithuania.Luxembourg.Macao.North Macedonia.Madagascar.Malawi.Malaysia.Maldives.Mali.Malta.Marshall Islands.Martinique.Mauritania.Mauritius.Mayotte.Mexico.Micronesia (Federated States of).Moldova, Republic of.Monaco.Mongolia.Montenegro.Montserrat.Morocco.Mozambique.Myanmar.Namibia.Nauru.Nepal.Netherlands.New Caledonia.New Zealand.Nicaragua.Niger.Nigeria.Niue.Norfolk Island.Northern Mariana Islands.Norway.Oman.Pakistan.Palau.Palestine, State of.Panama.Papua New Guinea.Paraguay.Peru.Philippines.Pitcairn.Poland.Portugal.Puerto Rico.Qatar.Réunion.Romania.Russian Federation.Rwanda.Saint Barthélemy.Saint Helena, Ascension and Tristan da Cunha.Saint Kitts and Nevis.Saint Lucia.Saint Martin (French part).Saint Pierre and Miquelon.Saint Vincent and the Grenadines.Samoa.San Marino.Sao Tome and Principe.Saudi Arabia.Senegal.Serbia.Seychelles.Sierra Leone.Singapore.Sint Maarten (Dutch part).Slovakia.Slovenia.Solomon Islands.Somalia.South Africa.South Georgia and the South Sandwich Islands.South Sudan.Spain.Sri Lanka.Sudan.Suriname.Svalbard and Jan Mayen.Swaziland.Sweden.Switzerland.Syrian Arab Republic.Taiwan, Province of China.Tajikistan.Tanzania, United Republic of.Thailand.Timor-Leste.Togo.Tokelau.Tonga.Trinidad and Tobago.Tunisia.Türkiye.Turkmenistan.Turks and Caicos Islands.Tuvalu.Uganda.Ukraine.United Arab Emirates.United Kingdom of Great Britain and Northern Ireland.United States of America.United States Minor Outlying Islands.Unknown or Invalid territory.Uruguay.Bucket for all user defined codes not managed by GBIF.Uzbekistan.Vanuatu.Holy See.Venezuela (Bolivarian Republic of).Viet Nam.Virgin Islands, (U.S.).Virgin Islands (British).Wallis and Futuna.Western Sahara.Yemen.Zambia.Zimbabwe. -
Field Summary
FieldsModifier and TypeFieldDescriptionA set of all 2- and 3-letter codes that are reserved by ISO for custom application specific usages. -
Method Summary
Modifier and TypeMethodDescriptionstatic Country
fromIsoCode
(String code) getTitle()
static boolean
isCustomCode
(String code) boolean
Note this includes Kosovo (XK).static Country
Returns the enum constant of this class with the specified name.static Country[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
AFGHANISTAN
Afghanistan. -
ALAND_ISLANDS
Åland Islands. -
ALBANIA
Albania. -
ALGERIA
Algeria. -
AMERICAN_SAMOA
American Samoa. -
ANDORRA
Andorra. -
ANGOLA
Angola. -
ANGUILLA
Anguilla. -
ANTARCTICA
Antarctica. -
ANTIGUA_BARBUDA
Antigua and Barbuda. -
ARGENTINA
Argentina. -
ARMENIA
Armenia. -
ARUBA
Aruba. -
AUSTRALIA
Australia. -
AUSTRIA
Austria. -
AZERBAIJAN
Azerbaijan. -
BAHAMAS
Bahamas. -
BAHRAIN
Bahrain. -
BANGLADESH
Bangladesh. -
BARBADOS
Barbados. -
BELARUS
Belarus. -
BELGIUM
Belgium. -
BELIZE
Belize. -
BENIN
Benin. -
BERMUDA
Bermuda. -
BHUTAN
Bhutan. -
BOLIVIA
Bolivia (Plurinational State of). -
BONAIRE_SINT_EUSTATIUS_SABA
Bonaire, Sint Eustatius and Saba. -
BOSNIA_HERZEGOVINA
Bosnia and Herzegovina. -
BOTSWANA
Botswana. -
BOUVET_ISLAND
Bouvet Island. -
BRAZIL
Brazil. -
BRITISH_INDIAN_OCEAN_TERRITORY
British Indian Ocean Territory. -
BRUNEI_DARUSSALAM
Brunei Darussalam. -
BULGARIA
Bulgaria. -
BURKINA_FASO
Burkina Faso. -
BURUNDI
Burundi. -
CAMBODIA
Cambodia. -
CAMEROON
Cameroon. -
CANADA
Canada. -
CAPE_VERDE
Cabo Verde. -
CAYMAN_ISLANDS
Cayman Islands. -
CENTRAL_AFRICAN_REPUBLIC
Central African Republic. -
CHAD
Chad. -
CHILE
Chile. -
CHINA
China. -
CHRISTMAS_ISLAND
Christmas Island. -
COCOS_ISLANDS
Cocos (Keeling) Islands. -
COLOMBIA
Colombia. -
COMOROS
Comoros. -
CONGO_DEMOCRATIC_REPUBLIC
Congo, Democratic Republic of the. -
CONGO
Congo, Republic of the. -
COOK_ISLANDS
Cook Islands. -
COSTA_RICA
Costa Rica. -
CÔTE_DIVOIRE
Côte d’Ivoire. -
CROATIA
Croatia. -
CUBA
Cuba. -
CURAÇAO
Curaçao. -
CYPRUS
Cyprus. -
CZECH_REPUBLIC
Czechia. -
DENMARK
Denmark. -
DJIBOUTI
Djibouti. -
DOMINICA
Dominica. -
DOMINICAN_REPUBLIC
Dominican Republic. -
ECUADOR
Ecuador. -
EGYPT
Egypt. -
EL_SALVADOR
El Salvador. -
EQUATORIAL_GUINEA
Equatorial Guinea. -
ERITREA
Eritrea. -
ESTONIA
Estonia. -
ETHIOPIA
Ethiopia. -
FALKLAND_ISLANDS
Falkland Islands (Malvinas). -
FAROE_ISLANDS
Faroe Islands. -
FIJI
Fiji. -
FINLAND
Finland. -
FRANCE
France. -
FRENCH_GUIANA
French Guiana. -
FRENCH_POLYNESIA
French Polynesia. -
FRENCH_SOUTHERN_TERRITORIES
French Southern Territories. -
GABON
Gabon. -
GAMBIA
Gambia. -
GEORGIA
Georgia. -
GERMANY
Germany. -
GHANA
Ghana. -
GIBRALTAR
Gibraltar. -
GREECE
Greece. -
GREENLAND
Greenland. -
GRENADA
Grenada. -
GUADELOUPE
Guadeloupe. -
GUAM
Guam. -
GUATEMALA
Guatemala. -
GUERNSEY
Guernsey. -
GUINEA
Guinea. -
GUINEA_BISSAU
Guinea-Bissau. -
GUYANA
Guyana. -
HAITI
Haiti. -
HEARD_MCDONALD_ISLANDS
Heard Island and McDonald Islands. -
VATICAN
Holy See. -
HONDURAS
Honduras. -
HONG_KONG
Hong Kong. -
HUNGARY
Hungary. -
ICELAND
Iceland. -
INDIA
India. -
INDONESIA
Indonesia. -
IRAN
Iran (Islamic Republic of). -
IRAQ
Iraq. -
IRELAND
Ireland. -
ISLE_OF_MAN
Isle of Man. -
ISRAEL
Israel. -
ITALY
Italy. -
JAMAICA
Jamaica. -
JAPAN
Japan. -
JERSEY
Jersey. -
JORDAN
Jordan. -
KAZAKHSTAN
Kazakhstan. -
KENYA
Kenya. -
KIRIBATI
Kiribati. -
KOREA_NORTH
Korea (Democratic People’s Republic of). -
KOREA_SOUTH
Korea, Republic of. -
KUWAIT
Kuwait. -
KYRGYZSTAN
Kyrgyzstan. -
LAO
Lao People’s Democratic Republic. -
LATVIA
Latvia. -
LEBANON
Lebanon. -
LESOTHO
Lesotho. -
LIBERIA
Liberia. -
LIBYA
Libya. -
LIECHTENSTEIN
Liechtenstein. -
LITHUANIA
Lithuania. -
LUXEMBOURG
Luxembourg. -
MACAO
Macao. -
MACEDONIA
North Macedonia. -
MADAGASCAR
Madagascar. -
MALAWI
Malawi. -
MALAYSIA
Malaysia. -
MALDIVES
Maldives. -
MALI
Mali. -
MALTA
Malta. -
MARSHALL_ISLANDS
Marshall Islands. -
MARTINIQUE
Martinique. -
MAURITANIA
Mauritania. -
MAURITIUS
Mauritius. -
MAYOTTE
Mayotte. -
MEXICO
Mexico. -
MICRONESIA
Micronesia (Federated States of). -
MOLDOVA
Moldova, Republic of. -
MONACO
Monaco. -
MONGOLIA
Mongolia. -
MONTENEGRO
Montenegro. -
MONTSERRAT
Montserrat. -
MOROCCO
Morocco. -
MOZAMBIQUE
Mozambique. -
MYANMAR
Myanmar. -
NAMIBIA
Namibia. -
NAURU
Nauru. -
NEPAL
Nepal. -
NETHERLANDS
Netherlands. -
NEW_CALEDONIA
New Caledonia. -
NEW_ZEALAND
New Zealand. -
NICARAGUA
Nicaragua. -
NIGER
Niger. -
NIGERIA
Nigeria. -
NIUE
Niue. -
NORFOLK_ISLAND
Norfolk Island. -
NORTHERN_MARIANA_ISLANDS
Northern Mariana Islands. -
NORWAY
Norway. -
OMAN
Oman. -
PAKISTAN
Pakistan. -
PALAU
Palau. -
PALESTINIAN_TERRITORY
Palestine, State of. -
PANAMA
Panama. -
PAPUA_NEW_GUINEA
Papua New Guinea. -
PARAGUAY
Paraguay. -
PERU
Peru. -
PHILIPPINES
Philippines. -
PITCAIRN
Pitcairn. -
POLAND
Poland. -
PORTUGAL
Portugal. -
PUERTO_RICO
Puerto Rico. -
QATAR
Qatar. -
RÉUNION
Réunion. -
ROMANIA
Romania. -
RUSSIAN_FEDERATION
Russian Federation. -
RWANDA
Rwanda. -
SAINT_BARTHÉLEMY
Saint Barthélemy. -
SAINT_HELENA_ASCENSION_TRISTAN_DA_CUNHA
Saint Helena, Ascension and Tristan da Cunha. -
SAINT_KITTS_NEVIS
Saint Kitts and Nevis. -
SAINT_LUCIA
Saint Lucia. -
SAINT_MARTIN_FRENCH
Saint Martin (French part). -
SAINT_PIERRE_MIQUELON
Saint Pierre and Miquelon. -
SAINT_VINCENT_GRENADINES
Saint Vincent and the Grenadines. -
SAMOA
Samoa. -
SAN_MARINO
San Marino. -
SAO_TOME_PRINCIPE
Sao Tome and Principe. -
SAUDI_ARABIA
Saudi Arabia. -
SENEGAL
Senegal. -
SERBIA
Serbia. -
SEYCHELLES
Seychelles. -
SIERRA_LEONE
Sierra Leone. -
SINGAPORE
Singapore. -
SINT_MAARTEN
Sint Maarten (Dutch part). -
SLOVAKIA
Slovakia. -
SLOVENIA
Slovenia. -
SOLOMON_ISLANDS
Solomon Islands. -
SOMALIA
Somalia. -
SOUTH_AFRICA
South Africa. -
SOUTH_GEORGIA_SANDWICH_ISLANDS
South Georgia and the South Sandwich Islands. -
SOUTH_SUDAN
South Sudan. -
SPAIN
Spain. -
SRI_LANKA
Sri Lanka. -
SUDAN
Sudan. -
SURINAME
Suriname. -
SVALBARD_JAN_MAYEN
Svalbard and Jan Mayen. -
SWAZILAND
Swaziland. -
SWEDEN
Sweden. -
SWITZERLAND
Switzerland. -
SYRIA
Syrian Arab Republic. -
TAIWAN
Taiwan, Province of China. -
TAJIKISTAN
Tajikistan. -
TANZANIA
Tanzania, United Republic of. -
THAILAND
Thailand. -
TIMOR_LESTE
Timor-Leste. -
TOGO
Togo. -
TOKELAU
Tokelau. -
TONGA
Tonga. -
TRINIDAD_TOBAGO
Trinidad and Tobago. -
TUNISIA
Tunisia. -
TURKEY
Türkiye. -
TURKMENISTAN
Turkmenistan. -
TURKS_CAICOS_ISLANDS
Turks and Caicos Islands. -
TUVALU
Tuvalu. -
UGANDA
Uganda. -
UKRAINE
Ukraine. -
UNITED_ARAB_EMIRATES
United Arab Emirates. -
UNITED_KINGDOM
United Kingdom of Great Britain and Northern Ireland. -
UNITED_STATES
United States of America. -
UNITED_STATES_OUTLYING_ISLANDS
United States Minor Outlying Islands. -
URUGUAY
Uruguay. -
UZBEKISTAN
Uzbekistan. -
VANUATU
Vanuatu. -
VENEZUELA
Venezuela (Bolivarian Republic of). -
VIETNAM
Viet Nam. -
VIRGIN_ISLANDS_BRITISH
Virgin Islands (British). -
VIRGIN_ISLANDS
Virgin Islands, (U.S.). -
WALLIS_FUTUNA
Wallis and Futuna. -
WESTERN_SAHARA
Western Sahara. -
YEMEN
Yemen. -
ZAMBIA
Zambia. -
ZIMBABWE
Zimbabwe. -
USER_DEFINED
Bucket for all user defined codes not managed by GBIF. User-assigned code elements are codes at the disposal of users who need to add further names of countries, territories, or other geographical entities to their in-house application of ISO 3166-1, and the ISO 3166/MA will never use these codes in the updating process of the standard. The following codes can be user-assigned: Alpha-2: AA, QM to QZ, XA to XZ, and ZZ Alpha-3: AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ Numeric: 900 to 999 -
KOSOVO
Kosovo. User-assigned temporary code, XK and XKX are the same as used by several other international organizations. 902 is assigned by GBIF, but these codes aren't used anywhere. -
INTERNATIONAL_WATERS
Taken from {@link <a href="https://en.wikipedia.org/wiki/UN/LOCODE">UN/LOCODE</a>} -
UNKNOWN
Unknown or Invalid territory.See {@link <a href="https://en.wikipedia.org/wiki/Common_Locale_Data_Repository">Unicode Common Locale Data Repository}
-
-
Field Details
-
CUSTOM_CODES
A set of all 2- and 3-letter codes that are reserved by ISO for custom application specific usages. The following codes can be user-assigned: Alpha-2: AA, QM to QZ, XA to XZ, and ZZ Alpha-3: AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ -
OFFICIAL_COUNTRIES
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isCustomCode
-
fromIsoCode
- Parameters:
code
- the case-insensitive 2- or 3-letter codes- Returns:
- the matching country or null
-
getTitle
- Returns:
- the country name in the English language as maintained by ISO.
-
getIso2LetterCode
- Returns:
- the 2-letter ISO 3166-1 ALPHA2 code in upper case.
-
getIso3LetterCode
- Returns:
- the 3-letter ISO 3166-1 ALPHA3 code in upper case.
-
getIsoNumericalCode
- Returns:
- the numerical ISO 3166-1 code.
-
getGbifRegion
- Returns:
- the
GbifRegion
associated with thisCountry
.
-
isOfficial
Note this includes Kosovo (XK).- Returns:
- true if it's an ISO 3166-1 alpha2 code officially used by GBIF.
-