public abstract class Country extends Object implements Serializable
ISOCountry and TestCountry for concrete implementations.| Constructor and Description |
|---|
Country() |
| Modifier and Type | Method and Description |
|---|---|
static Country |
getInstance(int code)
Gets a country given a country code.
|
static Country |
getInstance(String code)
Gets a country given a two or three letter code.
|
abstract String |
getName()
Gets the full name of the country.
|
abstract String |
getNationality()
Gets the adjectival form corresponding to the country.
|
abstract String |
toAlpha2Code()
Gets the two-digit country code.
|
abstract String |
toAlpha3Code()
Gets the three-digit country code.
|
abstract int |
valueOf()
Gets the numerical value (the code) of this country.
|
static Country[] |
values()
All countries.
|
public static Country getInstance(int code)
code - an ISO 3166 codepublic static Country getInstance(String code)
code - an alpha codepublic static Country[] values()
public abstract int valueOf()
public abstract String getName()
public abstract String getNationality()
public abstract String toAlpha2Code()
public abstract String toAlpha3Code()
Copyright © 2020. All rights reserved.