org.golibri.iso
Class Alpha3CountryCode
java.lang.Object
org.golibri.iso.Alpha3CountryCode
- public final class Alpha3CountryCode
- extends java.lang.Object
The Alpha3CountryCode class represents alpha-3 country codes as specified by the ISO 3166 Standard.
Alpha3CountryCode objects can be created with a String parameter and are immutable.
To create an Alpha3CountryCode object and check whether it exists conform the ISO 3166 Standard one
can use the factory method getCountryCode(String) from org.golibri.iso.Alpha3CountryCodes.
The Alpha3CountryCode class is for working specifically with alpha-3 country codes.
The preferred way to represent countries is with org.golibri.common.contact.Country.
- See Also:
Alpha3CountryCodes,
Country
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Alpha3CountryCode
public Alpha3CountryCode(java.lang.String countryCode)
- Constructor.
The String parameter should contain a well-formatted alpha-3 country code.
A well-formatted country code consists of exactly three alphanumeric characters.
- Parameters:
countryCode - String parameter containing the alpha-3 country code
- Throws:
java.lang.NullPointerException - If the parameter countryCode is null
java.lang.IllegalArgumentException - If the parameter countryCode is not well-formatted
getCountryCode
public java.lang.String getCountryCode()
- Returns the alpha-3 country code as String
- Returns:
- The alpha-3 country code
toString
public java.lang.String toString()
- See Also:
Object.toString()
hashCode
public int hashCode()
- See Also:
Object.hashCode()
equals
public boolean equals(java.lang.Object object)
- See Also:
Object.equals(java.lang.Object)