public final class

CurrencyDataImpl

extends DefaultCurrencyData
java.lang.Object
   ↳ com.google.gwt.i18n.client.DefaultCurrencyData
     ↳ com.google.gwt.i18n.client.impl.CurrencyDataImpl

Class Overview

A POJO for currency data.

Summary

Constants
int DEPRECATED_FLAG Public so CurrencyListGenerator can get to them.
int POS_FIXED_FLAG
int POS_SUFFIX_FLAG
int PRECISION_MASK
int SPACE_FORCED_FLAG
int SPACING_FIXED_FLAG
Public Constructors
CurrencyDataImpl(String currencyCode, String currencySymbol, int flagsAndPrecision)
Create a new CurrencyData whose portable symbol is the same as its local symbol.
CurrencyDataImpl(String currencyCode, String currencySymbol, int flagsAndPrecision, String portableCurrencySymbol)
Public Methods
int getDefaultFractionDigits()
Returns the default number of decimal positions for this currency.
static int getDefaultFractionDigits(int flagsAndPrecision)
String getPortableCurrencySymbol()
Returns the default symbol to use for this currency, intended to be recognizable in most locales.
static boolean isDeprecated(int flagsAndPrecision)
boolean isDeprecated()
Returns true if this currency is deprecated and should not be returned by default in currency lists.
boolean isSpaceForced()
Returns true if there should always be a space between the currency symbol and the number, false if there should be no space.
static boolean isSpaceForced(int flagsAndPrecision)
static boolean isSpacingFixed(int flagsAndPrecision)
boolean isSpacingFixed()
Returns true if the spacing between the currency symbol and the number is fixed regardless of locale defaults.
static boolean isSymbolPositionFixed(int flagsAndPrecision)
boolean isSymbolPositionFixed()
Returns true if the position of the currency symbol relative to the number is fixed regardless of locale defaults.
boolean isSymbolPrefix()
Returns true if the currency symbol should go before the number, false if it should go after the number.
static boolean isSymbolPrefix(int flagsAndPrecision)
[Expand]
Inherited Methods
From class com.google.gwt.i18n.client.DefaultCurrencyData
From class java.lang.Object
From interface com.google.gwt.i18n.client.CurrencyData

Constants

public static final int DEPRECATED_FLAG

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

Constant Value: 128 (0x00000080)

public static final int POS_FIXED_FLAG

Constant Value: 16 (0x00000010)

public static final int POS_SUFFIX_FLAG

Constant Value: 8 (0x00000008)

public static final int PRECISION_MASK

Constant Value: 7 (0x00000007)

public static final int SPACE_FORCED_FLAG

Constant Value: 32 (0x00000020)

public static final int SPACING_FIXED_FLAG

Constant Value: 64 (0x00000040)

Public Constructors

public CurrencyDataImpl (String currencyCode, String currencySymbol, int flagsAndPrecision)

Create a new CurrencyData whose portable symbol is the same as its local symbol.

public CurrencyDataImpl (String currencyCode, String currencySymbol, int flagsAndPrecision, String portableCurrencySymbol)

Public Methods

public int getDefaultFractionDigits ()

Returns the default number of decimal positions for this currency.

public static int getDefaultFractionDigits (int flagsAndPrecision)

public String getPortableCurrencySymbol ()

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 getCurrencySymbol().

public static boolean isDeprecated (int flagsAndPrecision)

public boolean isDeprecated ()

Returns true if this currency is deprecated and should not be returned by default in currency lists.

public boolean isSpaceForced ()

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 isSpacingFixed() returns true.

public static boolean isSpaceForced (int flagsAndPrecision)

public static boolean isSpacingFixed (int flagsAndPrecision)

public boolean isSpacingFixed ()

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 isSpaceForced().

public static boolean isSymbolPositionFixed (int flagsAndPrecision)

public boolean isSymbolPositionFixed ()

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 isSymbolPrefix().

public boolean isSymbolPrefix ()

Returns true if the currency symbol should go before the number, false if it should go after the number. This is ignored unless isSymbolPositionFixed() is true.

public static boolean isSymbolPrefix (int flagsAndPrecision)