Golibri

org.golibri.iso
Class Numeric3CountryCodes

java.lang.Object
  extended byorg.golibri.iso.Numeric3CountryCodes

public final class Numeric3CountryCodes
extends java.lang.Object


Constructor Summary
Numeric3CountryCodes()
           
 
Method Summary
static boolean exists(int countryCode)
          Method to check whether a country code exists.
static boolean exists(Numeric3CountryCode countryCode)
          Method to check whether a country code exists.
static boolean exists(java.lang.String countryCode)
          Method to check whether a country code exists.
static Numeric3CountryCode getCountryCode(int countryCode)
          Factory method to create country code objects.
static Numeric3CountryCode[] getCountryCodes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Numeric3CountryCodes

public Numeric3CountryCodes()
Method Detail

getCountryCode

public static Numeric3CountryCode getCountryCode(int countryCode)
Factory method to create country code objects. Constructing a CountryCode through this method also requires the country code to exist in the resource file org/golibri/iso/countrycodes.xml. The resource file can be found in the zip-file golibri-resources.zip which comes with each golibri distribution. If needed the XML-file can be updated or changed to serve your own needs.

Parameters:
countryCode -
Returns:

getCountryCodes

public static Numeric3CountryCode[] getCountryCodes()

exists

public static boolean exists(Numeric3CountryCode countryCode)
Method to check whether a country code exists. This method can be used to perform a check on CountryCode objects that were not created with the factory method getCountryCode or when the origin of the objects is incertain.

Parameters:
countryCode -
Returns:
True if the country code exists, false otherwise.

exists

public static boolean exists(java.lang.String countryCode)
Method to check whether a country code exists. This method can be used to perform a check on CountryCode objects that were not created with the factory method getCountryCode or when the origin of the objects is incertain.

Parameters:
countryCode -
Returns:
True if the country code exists, false otherwise.

exists

public static boolean exists(int countryCode)
Method to check whether a country code exists. This method can be be used to perform a check before getCountryCode() is called to avoid receiving an IllegalArgumentException.

Parameters:
countryCode -
Returns:
True if the country code exists, false otherwise.

Golibri