Interface CurrencyData

All Known Implementing Classes:
DefaultCurrencyData

public interface CurrencyData
Information about a currency.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the ISO4217 code for this currency.
    Returns the default symbol to use for this currency.
    int
    Returns the default number of decimal positions for this currency.
    Returns the default symbol to use for this currency, intended to be recognizable in most locales.
    Returns the simplest symbol to use for this currency, which is not guaranteed to be unique -- for example, this might return "$" for both USD and CAD.
    boolean
    Returns true if this currency is deprecated and should not be returned by default in currency lists.
    boolean
    Returns true if there should always be a space between the currency symbol and the number, false if there should be no space.
    boolean
    Returns true if the spacing between the currency symbol and the number is fixed regardless of locale defaults.
    boolean
    Returns true if the position of the currency symbol relative to the number is fixed regardless of locale defaults.
    boolean
    Returns true if the currency symbol should go before the number, false if it should go after the number.
  • Method Details

    • getCurrencyCode

      String getCurrencyCode()
      Returns the ISO4217 code for this currency.
    • getCurrencySymbol

      String getCurrencySymbol()
      Returns the default symbol to use for this currency.
    • getDefaultFractionDigits

      int getDefaultFractionDigits()
      Returns the default number of decimal positions for this currency.
    • getPortableCurrencySymbol

      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().
    • getSimpleCurrencySymbol

      String getSimpleCurrencySymbol()
      Returns the simplest symbol to use for this currency, which is not guaranteed to be unique -- for example, this might return "$" for both USD and CAD. It is acceptable to return the same value as getCurrencySymbol().
    • isDeprecated

      boolean isDeprecated()
      Returns true if this currency is deprecated and should not be returned by default in currency lists.
    • isSpaceForced

      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.
    • isSpacingFixed

      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().
    • isSymbolPositionFixed

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

      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.