Golibri

org.golibri.iso
Class CurrencyCodes

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

public final class CurrencyCodes
extends java.lang.Object


Constructor Summary
CurrencyCodes()
           
 
Method Summary
static boolean exists(CurrencyCode currencyCode)
          Method to check whether a country code exists.
static boolean exists(java.lang.String currencyCode)
          Method to check whether a country code exists.
static CurrencyCode getCurrencyCode(java.lang.String currencyCodeString)
          Factory method to create country code objects.
static CurrencyCode[] getCurrencyCodes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrencyCodes

public CurrencyCodes()
Method Detail

getCurrencyCode

public static CurrencyCode getCurrencyCode(java.lang.String currencyCodeString)
Factory method to create country code objects. Constructing a CurrencyCode 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.

Returns:

getCurrencyCodes

public static CurrencyCode[] getCurrencyCodes()

exists

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

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

exists

public static boolean exists(java.lang.String currencyCode)
Method to check whether a country code exists. This method can be be used to perform a check before getCurrencyCode() is called to avoid receiving an IllegalArgumentException.

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

Golibri