public abstract class Country
extends java.lang.Object
implements java.io.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(java.lang.String code)
Gets a country given a two or three letter code.
|
abstract java.lang.String |
getName()
Gets the full name of the country.
|
abstract java.lang.String |
getNationality()
Gets the adjectival form corresponding to the country.
|
abstract java.lang.String |
toAlpha2Code()
Gets the two-digit country code.
|
abstract java.lang.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(java.lang.String code)
code - an alpha codepublic static Country[] values()
public abstract int valueOf()
public abstract java.lang.String getName()
public abstract java.lang.String getNationality()
public abstract java.lang.String toAlpha2Code()
public abstract java.lang.String toAlpha3Code()
Copyright © 2023. All rights reserved.