com.dukascopy.api
Class Money

java.lang.Object
  extended by 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)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 double getAmount()
           
 java.util.Currency getCurrency()
           
 int hashCode()
           
 void setAmount(double amount)
           
 void setCurrency(java.util.Currency currency)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Money

public Money(double amount,
             java.util.Currency currency)
Method Detail

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