ZMObject
|
+--ZMCurrency
public class ZMCurrency
extends ZMObject
| Fields inherited from org.zenmagick.ZMObject | |
|---|---|
| properties_ | |
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| float | convertFrom(float amount) Convert from this currency into default currency. |
| float | convertTo(float amount) Convert from default currency into this currency. |
| string | format(float amount, boolean convert) Format the given amount according to this currency's rate and formatting rules. |
| string | getCode() Get the currency code. |
| int | Get the currency decimal places. |
| string | Get the currency decimal point. |
| int | getId() Get the currency id. |
| string | getName() Get the currency name. |
| double | getRate() Get the currency rate. |
| string | Get the currency symbox (left). |
| string | Get the currency symbox (right). |
| string | Get the currency thousands point. |
| float | parse(string value) Parse a formatted currency amount. |
| void | setCode(string code) Set the currency code. |
| void | setDecimalPlaces(int decimals) Set the currency decimal places. |
| void | setDecimalPoint(string point) Set the currency decimal point. |
| void | setId(int id) Set the currency id. |
| void | setName(string name) Set the currency name. |
| void | setRate(double rate) Set the currency rate. |
| void | setSymbolLeft(string symbol) Set the currency symbox (left). |
| void | setSymbolRight(string symbol) Set the currency symbox (right). |
| void | setThousandsPoint(string point) Set the currency thousands point. |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public ZMCurrency()
Create new instance. /
public float convertFrom(float amount)
Convert from this currency into default currency.
public float convertTo(float amount)
Convert from default currency into this currency.
public string format(float amount, boolean convert)
Format the given amount according to this currency's rate and formatting rules.
true, consider $amount to be in default currency and
* convert before formatting.public string getCode()
Get the currency code.
public int getDecimalPlaces()
Get the currency decimal places.
public string getDecimalPoint()
Get the currency decimal point.
public int getId()
Get the currency id.
public string getName()
Get the currency name.
public double getRate()
Get the currency rate.
This is the rate in relation to the default currency.
public string getSymbolLeft()
Get the currency symbox (left).
public string getSymbolRight()
Get the currency symbox (right).
public string getThousandsPoint()
Get the currency thousands point.
public float parse(string value)
Parse a formatted currency amount.
public void setCode(string code)
Set the currency code.
public void setDecimalPlaces(int decimals)
Set the currency decimal places.
public void setDecimalPoint(string point)
Set the currency decimal point.
public void setId(int id)
Set the currency id.
public void setName(string name)
Set the currency name.
public void setRate(double rate)
Set the currency rate.
This is the rate in relation to the default currency.
public void setSymbolLeft(string symbol)
Set the currency symbox (left).
public void setSymbolRight(string symbol)
Set the currency symbox (right).
public void setThousandsPoint(string point)
Set the currency thousands point.
A single currency.