au.gov.nehta.vendorlibrary.mdm.enums
Enum CountryCode

java.lang.Object
  extended by java.lang.Enum<CountryCode>
      extended by au.gov.nehta.vendorlibrary.mdm.enums.CountryCode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CountryCode>

public enum CountryCode
extends java.lang.Enum<CountryCode>

CountryCode Enumeration of country codes (ISO 3166).


Enum Constant Summary
AUSTRALIA
          Australia.
UNKNOWN
          Country code is unknown/unspecified - ie.
 
Method Summary
static CountryCode findByCode(java.lang.String code)
          Retrieves a CountryCode based on a supplied code value.
 java.lang.String getCode()
          Retrieve CountryCode code value.
static CountryCode valueOf(java.lang.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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUSTRALIA

public static final CountryCode AUSTRALIA
Australia.


UNKNOWN

public static final CountryCode UNKNOWN
Country code is unknown/unspecified - ie. blank string.

Method Detail

values

public static CountryCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CountryCode c : CountryCode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CountryCode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getCode

public java.lang.String getCode()
Retrieve CountryCode code value.

Returns:
Country code.

findByCode

public static CountryCode findByCode(java.lang.String code)
Retrieves a CountryCode based on a supplied code value.

Parameters:
code - Code to search for.
Returns:
Corresponding CountryCode or UNKNOWN if country code cannot be retrieved.