All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class benno.account.conv.DBAmount

java.lang.Object
   |
   +----benno.account.conv.DBAmount

public class DBAmount
extends Object
implements DBType
Version:
$Revision: 1.2 $
Author:
Ben Clifford

Constructor Index

 o DBAmount()
 o DBAmount(Amount)
 o DBAmount(long, Currency)
Creates a new amount, in the specified currency, with magnitude of u minor units.

Method Index

 o convertTo(Currency)
Returns a new Amount, representing an estimation of the value of the Amount in the specified Currency.
 o getCurrency()
Accessor method for currency
 o getUnits()
Accessor method for units
 o negate()
Returns an Amount equal to the negative of this amount
 o readFrom(DataInput)
 o toString()
Returns the Amount as a string, formatted according to the specifications in the currency.
 o toStringPlain()
Returns the Amount as a string without the currency symbols.
 o writeTo(DataOutput)

Constructors

 o DBAmount
 public DBAmount(long u,
                 Currency c)
Creates a new amount, in the specified currency, with magnitude of u minor units.

 o DBAmount
 public DBAmount()
 o DBAmount
 public DBAmount(Amount a)

Methods

 o toString
 public String toString()
Returns the Amount as a string, formatted according to the specifications in the currency.

Overrides:
toString in class Object
 o toStringPlain
 public String toStringPlain()
Returns the Amount as a string without the currency symbols. This format is suitable for putting in a TextField to edit the magnitude.

 o convertTo
 public Amount convertTo(Currency target)
Returns a new Amount, representing an estimation of the value of the Amount in the specified Currency.

Parameters:
target - The target currency
 o negate
 public Amount negate()
Returns an Amount equal to the negative of this amount

 o getCurrency
 public Currency getCurrency()
Accessor method for currency

 o getUnits
 public long getUnits()
Accessor method for units

 o writeTo
 public void writeTo(DataOutput d) throws IOException
 o readFrom
 public void readFrom(DataInput d) throws IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index