jgnash.engine
Class CurrencyNode
java.lang.Object
jgnash.engine.StoredObject
jgnash.engine.CommodityNode
jgnash.engine.CurrencyNode
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<CommodityNode>
public class CurrencyNode
- extends CommodityNode
Class for representing currency nodes
- Version:
- $Id$
- Author:
- Craig Cavanaugh
- See Also:
- Serialized Form
| Methods inherited from class jgnash.engine.CommodityNode |
equals, getDescription, getPrefix, getScale, getSuffix, getSymbol, hashCode, round, setDescription, setPrefix, setScale, setSuffix, setSymbol, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
locale
private java.util.Locale locale
exchangeRateDAO
private transient ExchangeRateDAO exchangeRateDAO
CurrencyNode
public CurrencyNode()
setLocale
public void setLocale(java.util.Locale locale)
getLocale
public java.util.Locale getLocale()
matches
public boolean matches(CommodityNode other)
- Determines if given node matches this node. The UUID is not used for comparison
- Overrides:
matches in class CommodityNode
- Parameters:
other - CurrencyNode to compare against
- Returns:
- true if objects match
compareTo
public int compareTo(CommodityNode node)
- Specified by:
compareTo in interface java.lang.Comparable<CommodityNode>- Overrides:
compareTo in class CommodityNode
getExchangeRateDAO
private ExchangeRateDAO getExchangeRateDAO()
- Returns:
- the exchangeRateStore
setExchangeRateDAO
void setExchangeRateDAO(ExchangeRateDAO exchangeRateStore)
- Parameters:
exchangeRateStore - the exchangeRateStore to set
getExchangeRate
public java.math.BigDecimal getExchangeRate(CurrencyNode exchangeCurrency)
- Returns an exchange rate given a currency to convert to.
- Parameters:
exchangeCurrency - currency to convert to
- Returns:
- exchange rate