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
-
DBAmount()
-
-
DBAmount(Amount)
-
-
DBAmount(long, Currency)
- Creates a new amount, in the specified currency, with
magnitude of u minor units.
-
convertTo(Currency)
- Returns a new Amount, representing an estimation of the
value of the Amount in the specified Currency.
-
getCurrency()
- Accessor method for currency
-
getUnits()
- Accessor method for units
-
negate()
- Returns an Amount equal to the negative of this amount
-
readFrom(DataInput)
-
-
toString()
- Returns the Amount as a string, formatted according to the
specifications in the currency.
-
toStringPlain()
- Returns the Amount as a string without the currency symbols.
-
writeTo(DataOutput)
-
DBAmount
public DBAmount(long u,
Currency c)
- Creates a new amount, in the specified currency, with
magnitude of u minor units.
DBAmount
public DBAmount()
DBAmount
public DBAmount(Amount a)
toString
public String toString()
- Returns the Amount as a string, formatted according to the
specifications in the currency.
- Overrides:
- toString in class Object
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.
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
negate
public Amount negate()
- Returns an Amount equal to the negative of this amount
getCurrency
public Currency getCurrency()
- Accessor method for currency
getUnits
public long getUnits()
- Accessor method for units
writeTo
public void writeTo(DataOutput d) throws IOException
readFrom
public void readFrom(DataInput d) throws IOException
All Packages Class Hierarchy This Package Previous Next Index