com.dukascopy.api
Class Money
java.lang.Object
com.dukascopy.api.Money
public final class Money
- extends java.lang.Object
Straightforward money bean (double value along with Currency).
Intended to be used in expressing monetary amounts and prices.
|
Constructor Summary |
Money(double amount,
java.util.Currency currency)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Money
public Money(double amount,
java.util.Currency currency)
getAmount
public double getAmount()
- Returns:
- the amount
setAmount
public void setAmount(double amount)
- Parameters:
amount - the amount to set
getCurrency
public java.util.Currency getCurrency()
- Returns:
- the currency
setCurrency
public void setCurrency(java.util.Currency currency)
- Parameters:
currency - the currency to set
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object