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])

Constructor Index

 o Amount()
Constructor without args
 o Amount(String, Currency)
Create an amount object

Method Index

 o equals(Amount)
redefine equals to suit our needs
 o getCurrency()
Get the currency.
 o getValue()
Set the numeric amount.
 o hashCode()
redefine hashCode to suit our needs
 o myStreamSize()
Implementing the Streamable interface
 o readObject(StreamInputInterface)
Implementing the Streamable interface
 o setCurrency(Currency)
Set the currency.
 o setValue(String)
Set the numeric amount.
 o toString()
redefine toString to suit our needs
 o writeObject(StreamOutputInterface)
Implementing the Streamable interface

Constructors

 o Amount
  public Amount()
Constructor without args
 o 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

Methods

 o equals
  public boolean equals(Amount other)
redefine equals to suit our needs
 o hashCode
  public int hashCode()
redefine hashCode to suit our needs
Overrides:
hashCode in class Object
 o toString
  public String toString()
redefine toString to suit our needs
Overrides:
toString in class Object
 o setValue
  public synchronized void setValue(String amount)
Set the numeric amount.
Parameters:
amount - numeric amount
Returns:
none
 o getValue
  public String getValue()
Set the numeric amount.
Returns:
numeric value of this amount
 o getCurrency
  public Currency getCurrency()
Get the currency.
Returns:
the currency of this amount
 o setCurrency
  public synchronized void setCurrency(Currency currency)
Set the currency.
Parameters:
currency - the currency of this amount
 o writeObject
  public void writeObject(StreamOutputInterface s) throws StreamIOException
Implementing the Streamable interface
Throws: StreamIOException
as usual
 o readObject
  public void readObject(StreamInputInterface s) throws StreamIOException
Implementing the Streamable interface
Throws: StreamIOException
as usual
 o myStreamSize
  public int myStreamSize() throws StreamIOException
Implementing the Streamable interface

All Packages  Class Hierarchy  This Package  Previous  Next  Index