|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.ds.fw.types.FwSimpleObject
|
+--com.ds.fw.types.money.FwMoney
| Field Summary | |
com.ds.fw.types.money.FwCurrency |
_currency
|
double |
_value
|
| Constructor Summary | |
FwMoney()
|
|
| Method Summary | |
com.ds.fw.types.money.FwMoneyIF |
add(com.ds.fw.types.money.FwMoneyIF m)
Adds value |
void |
addInPlace(com.ds.fw.types.money.FwMoneyIF m)
Adds some value to the current value of the variable _value |
boolean |
allowsCopy()
|
int |
compareTo(java.lang.Object e)
Compares this FwMoney object to another Object. |
double |
convertPrice(com.ds.fw.types.money.FwCurrency targetCur)
|
static com.ds.fw.types.money.FwMoneyIF |
createMoney(double d)
Creates a FwMoney object from a given double value |
static com.ds.fw.types.money.FwMoneyIF |
createMoney(java.lang.String s)
Creates a FwMoney object from some value (given as String) Converts the String to double value |
com.ds.fw.types.money.FwMoneyIF |
divideBy(double d)
Divide the value of the variable _value with the double given as parameter |
void |
divideByInPlace(double d)
Divide some value from the current value of variable _value |
boolean |
equals(java.lang.Object o)
Verify if the this FwMoney object is equals to the object , given as parameter |
com.ds.fw.types.money.FwCurrency |
getCurrency()
|
double |
getDoubleValue()
Gets the value of the variable _value as double |
int |
getIntValue()
Gets the value of the variable _value as int |
com.ds.fw.types.money.FwMoneyIF |
getMoneyCopy()
|
boolean |
isGreaterThan(com.ds.fw.types.money.FwMoneyIF m)
Verify if the value of the variable _value is greater than the value of the variable _value of the parameter m |
boolean |
isLessThan(com.ds.fw.types.money.FwMoneyIF m)
Verify if the value of the variable _value is less than the value of the variable _value of the parameter m |
boolean |
isNegative()
Verify if the value of the variable _value is negative |
boolean |
isPositive()
Verify if the value of the variable _value is positive |
boolean |
isZero()
Verify if the value of the variable _value() is equals to zero |
com.ds.fw.types.money.FwMoneyIF |
multiplyBy(double d)
Multiply the value of the variable _value with the double given as parameter |
void |
multiplyByInPlace(double d)
Multiply the value of the variable _value with the double , given as parameter |
void |
setCurrency(com.ds.fw.types.money.FwCurrency c)
|
void |
setCurrency1(com.ds.fw.types.money.FwCurrency c)
|
void |
setValue(double d)
Sets the value of the variable _value |
void |
setValue(com.ds.fw.types.money.FwMoneyIF m)
Sets the value of the variable _value |
void |
setValue(int i)
Sets the value of the variable _value |
void |
setValue(java.lang.String s)
Sets the value of the variable _value |
com.ds.fw.types.money.FwMoneyIF |
subtract(com.ds.fw.types.money.FwMoneyIF m)
Substracts a value |
void |
subtractInPlace(com.ds.fw.types.money.FwMoneyIF m)
Substract some value from the current value of the variable _value |
java.lang.String |
toStringValue()
Get the string form of the object's value. |
| Methods inherited from class com.ds.fw.types.FwSimpleObject |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, printStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, toString |
| Field Detail |
public double _value
public com.ds.fw.types.money.FwCurrency _currency
| Constructor Detail |
public FwMoney()
| Method Detail |
public static com.ds.fw.types.money.FwMoneyIF createMoney(double d)
d - - a double value
public static com.ds.fw.types.money.FwMoneyIF createMoney(java.lang.String s)
s -
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - - the reference object with which to compare
public boolean isLessThan(com.ds.fw.types.money.FwMoneyIF m)
isLessThan in interface FwMoneyIFm -
public boolean isGreaterThan(com.ds.fw.types.money.FwMoneyIF m)
isGreaterThan in interface FwMoneyIFm -
public int compareTo(java.lang.Object e)
compareTo in interface java.lang.Comparablee - - the object to be compared
public boolean isZero()
isZero in interface FwMoneyIFpublic boolean isPositive()
isPositive in interface FwMoneyIFpublic boolean isNegative()
isNegative in interface FwMoneyIFpublic void setValue(com.ds.fw.types.money.FwMoneyIF m)
setValue in interface FwMoneyIFm - public void setValue(int i)
setValue in interface FwMoneyIFi - - the new valuepublic void setValue(double d)
setValue in interface FwMoneyIFd - - the new valuepublic void setValue(java.lang.String s)
setValue in interface FwMoneyIFs - - the new value, given as string , if the string connot be parsed the value of _value is
set to zeropublic int getIntValue()
getIntValue in interface FwMoneyIFpublic double getDoubleValue()
getDoubleValue in interface FwMoneyIFpublic com.ds.fw.types.money.FwMoneyIF add(com.ds.fw.types.money.FwMoneyIF m)
add in interface FwMoneyIFm -
public com.ds.fw.types.money.FwMoneyIF subtract(com.ds.fw.types.money.FwMoneyIF m)
subtract in interface FwMoneyIFm -
public com.ds.fw.types.money.FwMoneyIF multiplyBy(double d)
multiplyBy in interface FwMoneyIFd - - the double value
public com.ds.fw.types.money.FwMoneyIF divideBy(double d)
divideBy in interface FwMoneyIFd - - a double value
public void addInPlace(com.ds.fw.types.money.FwMoneyIF m)
addInPlace in interface FwMoneyIFm - public void subtractInPlace(com.ds.fw.types.money.FwMoneyIF m)
subtractInPlace in interface FwMoneyIFm - public void multiplyByInPlace(double d)
multiplyByInPlace in interface FwMoneyIFd - - a doublepublic void divideByInPlace(double d)
divideByInPlace in interface FwMoneyIFd - - a doublepublic boolean allowsCopy()
public com.ds.fw.types.money.FwMoneyIF getMoneyCopy()
getMoneyCopy in interface FwMoneyIFpublic java.lang.String toStringValue()
FwDisplayableIF
toStringValue in interface FwSimpleObjectIFtoStringValue in class FwSimpleObjectpublic com.ds.fw.types.money.FwCurrency getCurrency()
getCurrency in interface FwMoneyIFpublic void setCurrency(com.ds.fw.types.money.FwCurrency c)
setCurrency in interface FwMoneyIFpublic void setCurrency1(com.ds.fw.types.money.FwCurrency c)
setCurrency1 in interface FwMoneyIFpublic double convertPrice(com.ds.fw.types.money.FwCurrency targetCur)
convertPrice in interface FwMoneyIF
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||