com.google.gwt.i18n.client.impl
Class CurrencyDataImpl

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.i18n.client.impl.CurrencyDataImpl
All Implemented Interfaces:
CurrencyData

public final class CurrencyDataImpl
extends JavaScriptObject
implements CurrencyData

JSO Overlay type that wraps currency data. The JSO is an array with three elements: 0 - ISO4217 currency code 1 - currency symbol to use for this locale 2 - flags and # of decimal digits: d0-d2: # of decimal digits for this currency, 0-7 d3: currency symbol goes after number, 0=before d4: currency symbol position is based on d3 d5: space is forced, 0=no space present d6: spacing around currency symbol is based on d5 3 - portable currency symbol (optional)


Field Summary
static int DEPRECATED_FLAG
           
static int POS_FIXED_FLAG
          Public so CurrencyListGenerator can get to them.
static int POS_SUFFIX_FLAG
           
static int PRECISION_MASK
           
static int SPACE_FORCED_FLAG
           
static int SPACING_FIXED_FLAG
           
 
Method Summary
 java.lang.String getCurrencyCode()
           
 java.lang.String getCurrencySymbol()
           
 int getDefaultFractionDigits()
           
 java.lang.String getPortableCurrencySymbol()
           
 boolean isDeprecated()
           
 boolean isSpaceForced()
           
 boolean isSpacingFixed()
           
 boolean isSymbolPositionFixed()
           
 boolean isSymbolPrefix()
           
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

POS_FIXED_FLAG

public static final int POS_FIXED_FLAG
Public so CurrencyListGenerator can get to them. As usual with an impl package, external code should not rely on these values.

See Also:
Constant Field Values

POS_SUFFIX_FLAG

public static final int POS_SUFFIX_FLAG
See Also:
Constant Field Values

PRECISION_MASK

public static final int PRECISION_MASK
See Also:
Constant Field Values

SPACE_FORCED_FLAG

public static final int SPACE_FORCED_FLAG
See Also:
Constant Field Values

SPACING_FIXED_FLAG

public static final int SPACING_FIXED_FLAG
See Also:
Constant Field Values

DEPRECATED_FLAG

public static final int DEPRECATED_FLAG
See Also:
Constant Field Values
Method Detail

getCurrencyCode

public java.lang.String getCurrencyCode()
Specified by:
getCurrencyCode in interface CurrencyData
Returns:
the ISO4217 code for this currency

getCurrencySymbol

public java.lang.String getCurrencySymbol()
Specified by:
getCurrencySymbol in interface CurrencyData
Returns:
the default symbol to use for this currency

getDefaultFractionDigits

public int getDefaultFractionDigits()
Specified by:
getDefaultFractionDigits in interface CurrencyData
Returns:
the default number of decimal positions for this currency

getPortableCurrencySymbol

public java.lang.String getPortableCurrencySymbol()
Specified by:
getPortableCurrencySymbol in interface CurrencyData
Returns:
the default symbol to use for this currency, intended to be recognizable in most locales. If such a symbol is not available, it is acceptable to return the same value as CurrencyData.getCurrencySymbol().

isDeprecated

public boolean isDeprecated()
Specified by:
isDeprecated in interface CurrencyData
Returns:
true if this currency is deprecated and should not be returned by default in currency lists.

isSpaceForced

public boolean isSpaceForced()
Specified by:
isSpaceForced in interface CurrencyData
Returns:
true if there should always be a space between the currency symbol and the number, false if there should be no space. Ignored unless CurrencyData.isSpacingFixed() returns true.

isSpacingFixed

public boolean isSpacingFixed()
Specified by:
isSpacingFixed in interface CurrencyData
Returns:
true if the spacing between the currency symbol and the number is fixed regardless of locale defaults. In this case, spacing will be determined by CurrencyData.isSpaceForced().

isSymbolPositionFixed

public boolean isSymbolPositionFixed()
Specified by:
isSymbolPositionFixed in interface CurrencyData
Returns:
true if the position of the currency symbol relative to the number is fixed regardless of locale defaults. In this case, the position will be determined by CurrencyData.isSymbolPrefix().

isSymbolPrefix

public boolean isSymbolPrefix()
Specified by:
isSymbolPrefix in interface CurrencyData
Returns:
true if the currency symbol should go before the number, false if it should go after the number. This is ignored unless CurrencyData.isSymbolPositionFixed() is true.