Golibri

org.golibri.common.finance
Class Currency

java.lang.Object
  extended byorg.golibri.common.finance.Currency

public class Currency
extends java.lang.Object

If you need to work with currencies, this is the class you want. Currency objects are created with a currency code. This can be a String or a org.golibri.iso.CurrencyCode.

See Also:
CurrencyCode

Constructor Summary
Currency(CurrencyCode currencyCode)
          Constructor.
Currency(java.lang.String currencyCode)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 CurrencyCode getCurrencyCode()
          Gets the currency code of this currency object.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Currency

public Currency(java.lang.String currencyCode)
Constructor. The String parameter should contain a valid currency code.

Parameters:
currencyCode - String parameter containing the currency code
Throws:
java.lang.NullPointerException - If the parameter currencyCode is null
java.lang.IllegalArgumentException - If the given currency code doesn't exist

Currency

public Currency(CurrencyCode currencyCode)
Constructor.

Parameters:
currencyCode - The currency code
Throws:
java.lang.NullPointerException - If the parameter currencyCode is null
java.lang.IllegalArgumentException - If the given currency code doesn't exist
Method Detail

getCurrencyCode

public CurrencyCode getCurrencyCode()
Gets the currency code of this currency object.

Returns:
the currency 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)

Golibri