Class semper.payment.Amount
All Packages Class Hierarchy This Package Previous Next Index
Class semper.payment.Amount
java.lang.Object
|
+----semper.payment.Amount
- public class Amount
- extends Object
- implements Streamable
Representation of an amount of money
- Version:
- $Revision: 1.6 $ $Date: 1996/07/19 15:00:21 $
- Author:
- N. Asokan ([email protected])
-
Amount()
- Constructor without args
-
Amount(String, Currency)
- Create an amount object
-
equals(Amount)
- redefine equals to suit our needs
-
getCurrency()
- Get the currency.
-
getValue()
- Set the numeric amount.
-
hashCode()
- redefine hashCode to suit our needs
-
myStreamSize()
- Implementing the Streamable interface
-
readObject(StreamInputInterface)
- Implementing the Streamable interface
-
setCurrency(Currency)
- Set the currency.
-
setValue(String)
- Set the numeric amount.
-
toString()
- redefine toString to suit our needs
-
writeObject(StreamOutputInterface)
- Implementing the Streamable interface
Amount
public Amount()
- Constructor without args
Amount
public Amount(String amount,
Currency currency)
- Create an amount object
- Parameters:
- amount - numeric amount (convert to a suitable type before
doing arithmatic with this amount)
- currency - currency
equals
public boolean equals(Amount other)
- redefine equals to suit our needs
hashCode
public int hashCode()
- redefine hashCode to suit our needs
- Overrides:
- hashCode in class Object
toString
public String toString()
- redefine toString to suit our needs
- Overrides:
- toString in class Object
setValue
public synchronized void setValue(String amount)
- Set the numeric amount.
- Parameters:
- amount - numeric amount
- Returns:
- none
getValue
public String getValue()
- Set the numeric amount.
- Returns:
- numeric value of this amount
getCurrency
public Currency getCurrency()
- Get the currency.
- Returns:
- the currency of this amount
setCurrency
public synchronized void setCurrency(Currency currency)
- Set the currency.
- Parameters:
- currency - the currency of this amount
writeObject
public void writeObject(StreamOutputInterface s) throws StreamIOException
- Implementing the Streamable interface
- Throws: StreamIOException
- as usual
readObject
public void readObject(StreamInputInterface s) throws StreamIOException
- Implementing the Streamable interface
- Throws: StreamIOException
- as usual
myStreamSize
public int myStreamSize() throws StreamIOException
- Implementing the Streamable interface
All Packages Class Hierarchy This Package Previous Next Index