public enum CountryCode extends Enum<CountryCode>
CountryCode
Enumeration of country codes (ISO 3166).| Enum Constant and Description |
|---|
AUSTRALIA
Australia.
|
UNKNOWN
Country code is unknown/unspecified - ie.
|
| Modifier and Type | Method and Description |
|---|---|
static CountryCode |
findByCode(String code)
Retrieves a
CountryCode based on a supplied code value. |
String |
getCode()
Retrieve
CountryCode code value. |
static CountryCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CountryCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CountryCode AUSTRALIA
public static final CountryCode UNKNOWN
public static CountryCode[] values()
for (CountryCode c : CountryCode.values()) System.out.println(c);
public static CountryCode 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 getCode()
CountryCode code value.public static CountryCode findByCode(String code)
CountryCode based on a supplied code value.code - Code to search for.CountryCode or UNKNOWN if country
code cannot be retrieved.Copyright © 2021. All rights reserved.