com.ds.fw.types.money
Interface FwMoneyIF

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable, FwCopyableIF, FwDisplayableIF, FwSimpleObjectIF, java.io.Serializable
All Known Implementing Classes:
FwMoney

public interface FwMoneyIF
extends FwSimpleObjectIF, java.lang.Comparable

I represent an amount of a specified currency. Someday I should be integrated with currencies and exchange rates and such but for now just act as a place holder for future internationalization.


Method Summary
 com.ds.fw.types.money.FwMoneyIF add(com.ds.fw.types.money.FwMoneyIF m)
           
 void addInPlace(com.ds.fw.types.money.FwMoneyIF m)
           
 double convertPrice(com.ds.fw.types.money.FwCurrency targetCur)
           
 com.ds.fw.types.money.FwMoneyIF divideBy(double d)
           
 void divideByInPlace(double d)
           
 com.ds.fw.types.money.FwCurrency getCurrency()
           
 double getDoubleValue()
          Gets the value as double
 int getIntValue()
          Gets the value as int
 com.ds.fw.types.money.FwMoneyIF getMoneyCopy()
           
 boolean isGreaterThan(com.ds.fw.types.money.FwMoneyIF m)
           
 boolean isLessThan(com.ds.fw.types.money.FwMoneyIF m)
           
 boolean isNegative()
          Check if the value is negative
 boolean isPositive()
          Check if the value is positive
 boolean isZero()
          Check for zero value
 com.ds.fw.types.money.FwMoneyIF multiplyBy(double d)
           
 void multiplyByInPlace(double d)
           
 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
 void setValue(com.ds.fw.types.money.FwMoneyIF m)
          Sets the value
 void setValue(int i)
          Sets the value
 void setValue(java.lang.String s)
          Sets the value
 com.ds.fw.types.money.FwMoneyIF subtract(com.ds.fw.types.money.FwMoneyIF m)
           
 void subtractInPlace(com.ds.fw.types.money.FwMoneyIF m)
           
 
Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, toString, toStringValue
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

setValue

public void setValue(com.ds.fw.types.money.FwMoneyIF m)
Sets the value


setValue

public void setValue(int i)
Sets the value


setValue

public void setValue(double d)
Sets the value


setValue

public void setValue(java.lang.String s)
Sets the value


isZero

public boolean isZero()
Check for zero value


isPositive

public boolean isPositive()
Check if the value is positive


isNegative

public boolean isNegative()
Check if the value is negative


isGreaterThan

public boolean isGreaterThan(com.ds.fw.types.money.FwMoneyIF m)

isLessThan

public boolean isLessThan(com.ds.fw.types.money.FwMoneyIF m)

add

public com.ds.fw.types.money.FwMoneyIF add(com.ds.fw.types.money.FwMoneyIF m)

subtract

public com.ds.fw.types.money.FwMoneyIF subtract(com.ds.fw.types.money.FwMoneyIF m)

multiplyBy

public com.ds.fw.types.money.FwMoneyIF multiplyBy(double d)

divideBy

public com.ds.fw.types.money.FwMoneyIF divideBy(double d)

addInPlace

public void addInPlace(com.ds.fw.types.money.FwMoneyIF m)

subtractInPlace

public void subtractInPlace(com.ds.fw.types.money.FwMoneyIF m)

multiplyByInPlace

public void multiplyByInPlace(double d)

divideByInPlace

public void divideByInPlace(double d)

getIntValue

public int getIntValue()
Gets the value as int


getDoubleValue

public double getDoubleValue()
Gets the value as double


getMoneyCopy

public com.ds.fw.types.money.FwMoneyIF getMoneyCopy()

getCurrency

public com.ds.fw.types.money.FwCurrency getCurrency()

setCurrency

public void setCurrency(com.ds.fw.types.money.FwCurrency c)

setCurrency1

public void setCurrency1(com.ds.fw.types.money.FwCurrency c)

convertPrice

public double convertPrice(com.ds.fw.types.money.FwCurrency targetCur)