|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.applib.value.Magnitude
org.nakedobjects.applib.value.Money
public class Money
| Constructor Summary | |
|---|---|
Money(double amount,
String currency)
|
|
Money(long amount,
String currency)
|
|
| Method Summary | |
|---|---|
Money |
add(Money money)
Add the specified money to this money. |
double |
doubleValue()
Returns this value as a double. |
boolean |
equals(Money other)
|
boolean |
equals(Object other)
|
float |
floatValue()
Returns this value as a float. |
BigDecimal |
getAmount()
|
String |
getCurrency()
|
int |
hashCode()
|
boolean |
hasSameCurrency(Money money)
|
int |
intValue()
Returns this value as an int. |
boolean |
isEqualTo(Magnitude magnitude)
|
boolean |
isGreaterThanZero()
|
boolean |
isLessThan(Magnitude magnitude)
|
boolean |
isLessThanZero()
Returns true if this value is less than zero. |
boolean |
isZero()
|
long |
longValue()
Returns this value as an long. |
Money |
subtract(Money money)
Subtract the specified amount from this value. |
String |
toString()
|
| Methods inherited from class org.nakedobjects.applib.value.Magnitude |
|---|
isBetween, isGreaterThan, isGreaterThanOrEqualTo, isLessThanOrEqualTo, max, min |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Money(double amount,
String currency)
public Money(long amount,
String currency)
| Method Detail |
|---|
public Money add(Money money)
public double doubleValue()
public float floatValue()
public BigDecimal getAmount()
public String getCurrency()
public boolean hasSameCurrency(Money money)
public int intValue()
public boolean isEqualTo(Magnitude magnitude)
isEqualTo in class Magnitudepublic boolean isGreaterThanZero()
public boolean isLessThan(Magnitude magnitude)
isLessThan in class Magnitudepublic boolean isLessThanZero()
public boolean isZero()
public long longValue()
public Money subtract(Money money)
public boolean equals(Object other)
equals in class Objectpublic boolean equals(Money other)
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||