net.commerce.zocalo.currency
Class Currency
java.lang.Object
net.commerce.zocalo.currency.Currency
- Direct Known Subclasses:
- Coupons, Funds
public abstract class Currency
- extends java.lang.Object
The basic trading unit. Funds (representing money) and Coupons
(representing other assets) are derived from Currency.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CURRENCY_SCALE
public static final double CURRENCY_SCALE
- See Also:
- Constant Field Values
Currency
protected Currency(CurrencyToken toke,
double bal)
makeEmptyCurrency
protected Currency makeEmptyCurrency()
makeEmpty
protected abstract Currency makeEmpty(CurrencyToken token)
getTokenName
public java.lang.String getTokenName()
negligible
public boolean negligible()
sameCurrency
public boolean sameCurrency(Currency otherCurrency)
balanceSameOrGreaterThan
public boolean balanceSameOrGreaterThan(double amount)
balanceLessThan
public boolean balanceLessThan(double amount)
transfer
public double transfer(Currency recipient)
transfer
public double transfer(double value,
Currency recipient)
getBalance
public double getBalance()