Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.i18n.client
Class DefaultCurrencyData

    java.lang.Object
      com.google.gwt.i18n.client.DefaultCurrencyData

All Implemented Interfaces:
  CurrencyData

    public class DefaultCurrencyData

extends java.lang.Object
implements CurrencyData

A default `CurrencyData` implementation, so new methods can be added to the interface without breaking implementors if a reasonable default is available.

Constructor Summary
`DefaultCurrencyData(java.lang.String currencyCode, java.lang.String currencySymbol)` Create a default default `CurrencyData` instance, returning `false` for all `isFoo` methods, having 2 fractional digits by default, and using the standard symbol for the portable symbol.
`DefaultCurrencyData(java.lang.String currencyCode, java.lang.String currencySymbol, int fractionDigits)` Create a default default `CurrencyData` instance, returning `false` for all `isFoo` methods and using the standard symbol for the portable symbol.

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 java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultCurrencyData

    public DefaultCurrencyData(java.lang.String currencyCode,
                               java.lang.String currencySymbol)

  Create a default default `CurrencyData` instance, returning `false` for all `isFoo` methods, having 2 fractional digits by default, and using the standard symbol for the portable symbol.

  Parameters:
    `currencyCode` - ISO 4217 currency code
    `currencySymbol` - symbol to use for this currency

### DefaultCurrencyData

    public DefaultCurrencyData(java.lang.String currencyCode,
                               java.lang.String currencySymbol,
                               int fractionDigits)

  Create a default default `CurrencyData` instance, returning `false` for all `isFoo` methods and using the standard symbol for the portable symbol.

  Parameters:
    `currencyCode` - ISO 4217 currency code
    `currencySymbol` - symbol to use for this currency
    `fractionDigits` - default number of fraction digits

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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD