Class semper.payment.Currency
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.payment.Currency

java.lang.Object
   |
   +----semper.payment.Currency

public class Currency
extends Object
implements Streamable
Class for representing different types of currency
Version:
$Revision: 1.6 $ $Date: 1996/07/19 15:00:21 $
Author:
N. Asokan ([email protected])
See Also:
Amount

Variable Index

 o UNKNOWN_CURRENCY

Constructor Index

 o Currency()
Constructor without arguments
 o Currency(int)
Constructor: Create a currency object given internal numeric code.
 o Currency(String)
Constructor: Create a currency object given 3-letter ISO code.

Method Index

 o equals(Currency)
redefine equals to suit our needs
 o getISOCode()
Get the 3-letter ISO code of the current Currency object.
 o getNumericCode()
Get the internal numberic code for the current Currency object.
 o hashcode()
redefine hashCode to suit our needs
 o myStreamSize()
Implementing the Streamable interface
 o readObject(StreamInputInterface)
Implementing the Streamable interface
 o toString()
redefine toString to suit our needs
 o writeObject(StreamOutputInterface)
Implementing the Streamable interface

Variables

 o UNKNOWN_CURRENCY
  public final int UNKNOWN_CURRENCY

Constructors

 o Currency
  public Currency(int code)
Constructor: Create a currency object given internal numeric code.
Parameters:
code - internal numneric code
Returns:
none
 o Currency
  public Currency(String code)
Constructor: Create a currency object given 3-letter ISO code. If this is an unknown code, it will simply be stored as is.
Parameters:
code - 3-letter ISO code
Returns:
none
 o Currency
  public Currency()
Constructor without arguments

Methods

 o equals
  public boolean equals(Currency other)
redefine equals to suit our needs
 o hashcode
  public int hashcode()
redefine hashCode to suit our needs
 o toString
  public String toString()
redefine toString to suit our needs
Overrides:
toString in class Object
 o getISOCode
  public String getISOCode()
Get the 3-letter ISO code of the current Currency object. For an unknown currency, this will be whatever string that the creator of the object set.
Returns:
3-letter ISO code for the currency
 o getNumericCode
  public int getNumericCode()
Get the internal numberic code for the current Currency object.
Returns:
internal numeric code of the currency
 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