Packagexp.utils
Classpublic class Currency

Basic curency formatting information

See also

support


Public Properties
 PropertyDefined by
  currencyCode : String
Gets the ISO 4217 currency code of this currency.
Currency
  decimals : int
Gets the default number of fraction digits used with this currency.
Currency
  symbol : String
Gets the symbol of this currency for the default locale.
Currency
Public Methods
 MethodDefined by
  
Currency(currencyCode:String, decimals:int, symbol:String)
Currency
  
getCountryInstance(country:String):Currency
[static] Returns the Currency instance for the given country code.
Currency
  
getInstance(currencyCode:String):Currency
[static] Returns the Currency instance for the given currency code.
Currency
  
toString():String
Returns the ISO 4217 currency code of this currency.
Currency
Public Constants
 ConstantDefined by
  AUD : Object
[static]
Currency
  EUR : Object
[static]
Currency
  GBP : Object
[static]
Currency
  HKD : Object
[static]
Currency
  NZD : Object
[static]
Currency
  SGD : Object
[static]
Currency
  TWD : Object
[static]
Currency
  USD : Object
[static]
Currency
Property detail
currencyCodeproperty
public var currencyCode:String

Gets the ISO 4217 currency code of this currency.

decimalsproperty 
public var decimals:int

Gets the default number of fraction digits used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it's 0. In the case of pseudo-currencies, such as IMF Special Drawing Rights, -1 is returned.

symbolproperty 
public var symbol:String

Gets the symbol of this currency for the default locale. For example, for the US Dollar, the symbol is "$" if the default locale is the US, while for other locales it may be "US$". If no symbol can be determined, the ISO 4217 currency code is returned.

Constructor detail
Currency()constructor
public function Currency(currencyCode:String, decimals:int, symbol:String)Parameters
currencyCode:String
 
decimals:int
 
symbol:String
Method detail
getCountryInstance()method
public static function getCountryInstance(country:String):Currency

Returns the Currency instance for the given country code.

Parameters
country:String — the ISO 3166 code of the country

Returns
Currency — the Currency instance for the given country code
getInstance()method 
public static function getInstance(currencyCode:String):Currency

Returns the Currency instance for the given currency code.

Parameters
currencyCode:String — the ISO 4217 code of the currency

Returns
Currency — the Currency instance for the given currency code
toString()method 
public function toString():String

Returns the ISO 4217 currency code of this currency.

Returns
String — the ISO 4217 currency code of this currency
Constant detail
AUDconstant
public static const AUD:Object
EURconstant 
public static const EUR:Object
GBPconstant 
public static const GBP:Object
HKDconstant 
public static const HKD:Object
NZDconstant 
public static const NZD:Object
SGDconstant 
public static const SGD:Object
TWDconstant 
public static const TWD:Object
USDconstant 
public static const USD:Object