Enum IsoCountry

java.lang.Object
java.lang.Enum<IsoCountry>
fr.marcwrobel.jbanking.IsoCountry
All Implemented Interfaces:
Serializable, Comparable<IsoCountry>, java.lang.constant.Constable

public enum IsoCountry extends Enum<IsoCountry>
The countries, dependent territories, and special areas of geographical interest having an Officially assigned ISO 3166-1 code.

One exception has been made for Kosovo. Kosovo has a user-assigned code, XK, that is being used temporarily by the European Commission, the IMF, and SWIFT.

Note that enum entries are named after the ISO 3166-1 alpha-2 code. This choice has been made in version 3.0.0 of jbanking in order to :

  • reduce breaking changes in future versions (names change more often than codes),
  • make this enum easier to serialize (to JSON, in database...),
  • prevent accidental duplicates.

Please be advised that this list is current as of 2020-08-03. An up-to-date list can be found on the International Organization for Standardization website.

Usage:

 IsoCountry country = IsoCountry.fromAlpha2Code("FR").get();

 Assertion.assertEquals("FRA", country.getAlpha3Code());
 Assertion.assertEquals(250, country.getNumericCode());
 Assertion.assertTrue(country.isIndependent());
 Assertion.assertTrue(country.isParticipatingTo(EUROPEAN_ECONOMIC_AREA));
 
Since:
1.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Andorra (aka the Principality of Andorra).
    The United Arab Emirates.
    Afghanistan (aka the Islamic Republic of Afghanistan).
    Antigua and Barbuda.
    Anguilla.
    Albania (aka the Republic of Albania).
    Armenia (aka the Republic of Armenia).
    Angola (a.k.a the Republic of Angola).
    Antarctica.
    Argentina (aka the Argentine Republic).
    American Samoa.
    Austria (aka the Republic of Austria).
    Australia.
    Aruba.
    Åland Islands.
    Azerbaijan (a.k.a the Republic of Azerbaijan).
    Bosnia and Herzegovina.
    Barbados.
    Bangladesh (aka the People's Republic of Bangladesh).
    Belgium (aka the Kingdom of Belgium).
    Burkina Faso.
    Bulgaria (a.k.a the Republic of Bulgaria).
    Bahrain (aka the Kingdom of Bahrain).
    Burundi (aka the Republic of Burundi).
    Benin (aka the Republic of Benin).
    Saint Barthélemy.
    Bermuda.
    Brunei Darussalam.
    Bolivia (aka the Plurinational State of Bolivia).
    Bonaire, Sint Eustatius and Saba.
    Brazil (a.k.a the Federative Republic of Brazil).
    The Bahamas (aka the Commonwealth of the Bahamas).
    Bhutan (aka the Kingdom of Bhutan).
    Bouvet Island.
    Botswana (aka the Republic of Botswana).
    Belarus (aka the Republic of Belarus).
    Belize.
    Canada.
    The Cocos (Keeling) Islands.
    The Democratic Republic of the Congo.
    The Central African Republic.
    The Congo (aka the Republic of the Congo).
    Switzerland (aka the Swiss Confederation).
    Côte d'Ivoire (a.k.a the Republic of Côte d'Ivoire).
    The Cook Islands.
    Chile (aka the Republic of Chile).
    Cameroon (aka the Republic of Cameroon).
    China (aka the People's Republic of China).
    Colombia (aka the Republic of Colombia).
    Costa Rica (aka the Republic of Costa Rica).
    Cuba (aka the Republic of Cuba).
    Cabo Verde (aka the Republic of Cabo Verde).
    Curaçao.
    Christmas Island.
    Cyprus (aka the Republic of Cyprus).
    Czechia (aka the Czech Republic).
    Germany (aka the Federal Republic of Germany).
    Djibouti (aka the Republic of Djibouti).
    Denmark (aka the Kingdom of Denmark).
    Dominica (aka the Commonwealth of Dominica).
    The Dominican Republic.
    Algeria (aka the People's Democratic Republic of Algeria).
    Ecuador (aka the Republic of Ecuador).
    Estonia (aka the Republic of Estonia).
    Egypt (aka the Arab Republic of Egypt).
    Western Sahara (provisional name).
    Eritrea (aka the State of Eritrea).
    Spain (aka the Kingdom of Spain).
    Ethiopia (aka the Federal Democratic Republic of Ethiopia).
    Finland (aka the Republic of Finland).
    Fiji (aka the Republic of Fiji).
    The Falkland Island (Malvinas).
    The Federated States of Micronesia.
    The Faroe Islands.
    France (aka the French Republic).
    Gabon (aka the Gabonese Republic).
    The United Kingdom of Great Britain and Northern Ireland (aka the United Kingdom or Britain).
    Grenada.
    Georgia.
    French Guiana.
    Guernsey.
    Ghana (aka the Republic of Ghana).
    Gibraltar.
    Greenland.
    The Gambia (aka the Republic of the Gambia).
    Guinea (aka the Republic of Guinea).
    Guadeloupe.
    Equatorial Guinea (aka the Republic of Equatorial Guinea).
    Greece (aka the Hellenic Republic).
    South Georgia and the South Sandwich Islands.
    Guatemala (aka the Republic of Guatemala).
    Guam.
    Guinea-Bissau (aka the Republic of Guinea-Bissau).
    Guyana (aka the Co-operative Republic of Guyana).
    Hong Kong (aka the Hong Kong Special Administrative Region of China).
    Heard Island and McDonald Islands.
    Honduras (aka the Republic of Honduras).
    Croatia (aka the Republic of Croatia).
    Haiti (aka the Republic of Haiti).
    Hungary.
    Indonesia (aka the Republic of Indonesia).
    Ireland.
    Israel (aka the State of Israel).
    Isle of Man.
    India (aka the Republic of India).
    The British Indian Ocean Territory.
    Iraq (aka the Republic of Iraq).
    The Islamic Republic of Iran.
    Iceland (aka the Republic of Iceland).
    Italy (aka the Republic of Italy).
    Jersey.
    Jamaica.
    Jordan (aka the Hashemite Kingdom of Jordan).
    Japan.
    Kenya (aka the Republic of Kenya).
    Kyrgyzstan (aka the Kyrgyz Republic).
    Cambodia (aka the Kingdom of Cambodia).
    Kiribati (aka the Republic of Kiribati).
    The Comoros (aka the Union of the Comoros).
    Saint Kitts and Nevis.
    The Democratic People's Republic of Korea (aka North Korea).
    The Republic of Korea (aka South Korea).
    Kuwait (aka the State of Kuwait).
    The Cayman Islands.
    Kazakhstan (aka the Republic of Kazakhstan).
    The Lao People's Democratic Republic.
    Lebanon (aka the Lebanese Republic).
    Saint Lucia.
    Liechtenstein (aka the Principality of Liechtenstein).
    Sri Lanka (aka the Democratic Socialist Republic of Sri Lanka).
    Liberia (aka the Republic of Liberia).
    Lesotho (aka the Kingdom of Lesotho).
    Lithuania (aka the Republic of Lithuania).
    Luxembourg (aka the Grand Duchy of Luxembourg).
    Latvia (aka the Republic of Latvia).
    Libya (aka the State of Libya).
    Morocco (aka the Kingdom of Morocco).
    Monaco (aka the Principality of Monaco).
    The Republic of Moldova.
    Montenegro.
    Saint Martin (French part).
    Madagascar (aka the Republic of Madagascar).
    The Marshall Islands (aka the Republic of the Marshall Islands).
    North Macedonia (aka the Republic of North Macedonia).
    Mali (aka the Republic of Mali).
    Myanmar (aka the Republic of the Union of Myanmar).
    Mongolia.
    Macao (a.k.a Macao Special Administrative Region of China).
    The Northern Mariana Islands (aka the Commonwealth of the Northern Mariana Islands).
    Martinique.
    Mauritania (aka the Islamic Republic of Mauritania).
    Montserrat.
    Malta (aka the Republic of Malta).
    Mauritius (aka the Republic of Mauritius).
    Maldives (aka the Republic of Maldives).
    Malawi (aka the Republic of Malawi).
    Mexico (aka the United Mexican States).
    Malaysia.
    Mozambique (aka the Republic of Mozambique).
    Namibia (aka the Republic of Namibia).
    New Caledonia.
    The Niger (aka the Republic of the Niger).
    Norfolk Island.
    Nigeria (aka the Federal Republic of Nigeria).
    Nicaragua (aka the Republic of Nicaragua).
    The Netherlands (aka the Kingdom of the Netherlands).
    Norway (aka the Kingdom of Norway).
    Nepal (aka the Federal Democratic Republic of Nepal).
    Nauru (aka the Republic of Nauru).
    Niue.
    New Zealand.
    Oman (aka the Sultanate of Oman).
    Panama (aka the Republic of Panama).
    Peru (aka the Republic of Peru).
    French Polynesia.
    Papua New Guinea (aka the Independent State of Papua New Guinea).
    The Philippines (aka the Republic of the Philippines).
    Pakistan (aka the Islamic Republic of Pakistan).
    Poland (aka the Republic of Poland).
    Saint Pierre and Miquelon.
    Pitcairn.
    Puerto Rico.
    The State of Palestine.
    Portugal (aka the Portuguese Republic).
    Palau (aka the Republic of Palau).
    Paraguay (aka the Republic of Paraguay).
    Qatar (aka the State of Qatar).
    Réunion.
    Romania.
    Serbia (aka the Republic of Serbia).
    The Russian Federation (aka Russia).
    Rwanda (aka the Republic of Rwanda).
    Saudi Arabia (aka the Kingdom of Saudi Arabia).
    Solomon Islands.
    Seychelles (aka the Republic of Seychelles).
    The Sudan (aka the Republic of the Sudan).
    Sweden (aka the Kingdom of Sweden).
    Singapore (aka the Republic of Singapore).
    Saint Helena, Ascension and Tristan da Cunha.
    Slovenia (aka the Republic of Slovenia).
    Svalbard and Jan Mayen.
    Slovakia (aka the Slovak Republic).
    Sierra Leone (aka the Republic of Sierra Leone).
    San Marino (aka the Republic of San Marino).
    Senegal (aka the Republic of Senegal).
    Somalia (aka the Federal Republic of Somalia).
    Suriname (aka the Republic of Suriname).
    South Sudan (aka the Republic of South Sudan).
    São Tomé and Príncipe (aka the Democratic Republic of São Tomé and Príncipe).
    El Salvador (aka the Republic of El Salvador).
    Sint Maarten (Dutch part).
    The Syrian Arab Republic.
    Eswatini (aka the Kingdom of Eswatini).
    The Turks and Caicos Islands.
    Chad (aka the Republic of Chad).
    The French Southern Territories.
    Togo (aka the Togolese Republic).
    Thailand (aka the Kingdom of Thailand).
    Tajikistan (aka the Republic of Tajikistan).
    Tokelau.
    Timor-Leste (aka the Democratic Republic of Timor-Leste).
    Turkmenistan.
    Tunisia (aka the Republic of Tunisia).
    Tonga (aka the Kingdom of Tonga).
    Turkey (aka the Republic of Turkey).
    Trinidad and Tobago (aka the Republic of Trinidad and Tobago).
    Tuvalu.
    Taiwan (Province of China).
    The United Republic of Tanzania.
    Ukraine.
    Uganda (aka the Republic of Uganda).
    The United States Minor Outlying Islands.
    The United States of America.
    Uruguay (aka the Eastern Republic of Uruguay).
    Uzbekistan (aka the Republic of Uzbekistan).
    The Holy See (aka the Vatican City State).
    Saint Vincent and the Grenadines.
    The Bolivarian Republic of Venezuela.
    The British Virgin Islands.
    The US Virgin Islands (aka the Virgin Islands of the United States).
    Viet Nam (aka the Socialist Republic of Viet Nam).
    Vanuatu (aka the Republic of Vanuatu).
    Wallis and Futuna (aka Wallis and Futuna Islands).
    Samoa (aka the Independent State of Samoa).
    Kosovo.
    Yemen (aka the Republic of Yemen).
    Mayotte.
    South Africa (aka the Republic of South Africa).
    Zambia (aka the Republic of Zambia).
    Zimbabwe (aka the Republic of Zimbabwe).
  • Method Summary

    Modifier and Type
    Method
    Description
    Translate the given ISO 3166-1 alpha-2 code to an IsoCountry.
    Translate the given ISO 3166-1 alpha-3 code to an IsoCountry.
    fromNumericCode(int code)
    Translate the given ISO 3166-1 numeric code to an IsoCountry.
    Returns this country ISO 3166-1 alpha-2 code.
    Returns this country ISO 3166-1 alpha-3 code.
    Returns the country on which this country depends.
    Returns this country ISO 3166-1 numeric code.
    boolean
    Whether this country is independent, according to the International Organization for Standardization (ISO).
    boolean
    Check whether this country is participating in the given Agreement.
    This country participations to economic agreements.
    static IsoCountry
    Returns the enum constant of this type with the specified name.
    static IsoCountry[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait