Class CurrencyData.DefaultInfo

Enclosing class:
CurrencyData

public static class CurrencyData.DefaultInfo extends CurrencyData.CurrencyDisplayInfo
  • Field Details

  • Constructor Details

    • DefaultInfo

      private DefaultInfo(boolean fallback)
  • Method Details

    • getWithFallback

      public static final CurrencyData.CurrencyDisplayInfo getWithFallback(boolean fallback)
    • getName

      public String getName(String isoCode)
      Description copied from class: CurrencyDisplayNames
      Returns the 'long name' for the currency with the provided ISO code. If there is no data for the ISO code, substitutes isoCode, or returns null if noSubstitute was set in the factory method.
      Specified by:
      getName in class CurrencyDisplayNames
      Parameters:
      isoCode - the three-letter ISO code
      Returns:
      the display name
    • getPluralName

      public String getPluralName(String isoCode, String pluralType)
      Description copied from class: CurrencyDisplayNames
      Returns a 'plural name' for the currency with the provided ISO code corresponding to the pluralKey. If there is no data for the ISO code, substitutes isoCode or returns null. If there is data for the ISO code but no data for the plural key, substitutes the 'other' value (and failing that the isoCode) or returns null.
      Specified by:
      getPluralName in class CurrencyDisplayNames
      Parameters:
      isoCode - the three-letter ISO code
      pluralType - the plural key, for example "one", "other"
      Returns:
      the display name
      See Also:
    • getSymbol

      public String getSymbol(String isoCode)
      Description copied from class: CurrencyDisplayNames
      Returns the symbol for the currency with the provided ISO code.

      If there is no data for this symbol, substitutes isoCode, or returns null if noSubstitute was set in the factory method.

      Specified by:
      getSymbol in class CurrencyDisplayNames
      Parameters:
      isoCode - the three-letter ISO code.
      Returns:
      the symbol.
    • getNarrowSymbol

      public String getNarrowSymbol(String isoCode)
      Description copied from class: CurrencyDisplayNames
      Returns the narrow symbol for the currency with the provided ISO code.

      The narrow currency symbol is similar to the regular currency symbol, but it always takes the shortest form; for example, "$" instead of "US$" for USD in en-CA.

      If there is no data for this symbol, substitutes the default symbol, or returns null if noSubstitute was set in the factory method.

      Specified by:
      getNarrowSymbol in class CurrencyDisplayNames
      Parameters:
      isoCode - the three-letter ISO code.
      Returns:
      the narrow symbol.
    • getFormalSymbol

      public String getFormalSymbol(String isoCode)
      Description copied from class: CurrencyDisplayNames
      Returns the formal symbol for the currency with the provided ISO code.

      The formal currency symbol is similar to the regular currency symbol, but it always takes the form used in formal settings such as banking; for example, "NT$" instead of "$" for TWD in zh-TW.

      If there is no data for this symbol, substitutes the default symbol, or returns null if noSubstitute was set in the factory method.

      Specified by:
      getFormalSymbol in class CurrencyDisplayNames
      Parameters:
      isoCode - the three-letter ISO code.
      Returns:
      the formal symbol.
    • getVariantSymbol

      public String getVariantSymbol(String isoCode)
      Description copied from class: CurrencyDisplayNames
      Returns the variant symbol for the currency with the provided ISO code.

      The variant symbol for a currency is an alternative symbol that is not necessarily as widely used as the regular symbol.

      If there is no data for variant symbol, substitutes the default symbol, or returns null if noSubstitute was set in the factory method.

      Specified by:
      getVariantSymbol in class CurrencyDisplayNames
      Parameters:
      isoCode - the three-letter ISO code.
      Returns:
      the variant symbol.
    • symbolMap

      public Map<String,String> symbolMap()
      Description copied from class: CurrencyDisplayNames
      Returns a mapping from localized symbols and currency codes to currency codes. The returned map is unmodifiable.
      Specified by:
      symbolMap in class CurrencyDisplayNames
      Returns:
      the map
    • nameMap

      public Map<String,String> nameMap()
      Description copied from class: CurrencyDisplayNames
      Returns a mapping from localized names (standard and plural) to currency codes. The returned map is unmodifiable.
      Specified by:
      nameMap in class CurrencyDisplayNames
      Returns:
      the map
    • getULocale

      public ULocale getULocale()
      Description copied from class: CurrencyDisplayNames
      Returns the locale used to determine how to translate the currency names. This is not necessarily the same locale passed to CurrencyDisplayNames.getInstance(ULocale).
      Specified by:
      getULocale in class CurrencyDisplayNames
      Returns:
      the display locale
    • getUnitPatterns

      public Map<String,String> getUnitPatterns()
      Specified by:
      getUnitPatterns in class CurrencyData.CurrencyDisplayInfo
    • getFormatInfo

      public CurrencyData.CurrencyFormatInfo getFormatInfo(String isoCode)
      Specified by:
      getFormatInfo in class CurrencyData.CurrencyDisplayInfo
    • getSpacingInfo

      public CurrencyData.CurrencySpacingInfo getSpacingInfo()
      Specified by:
      getSpacingInfo in class CurrencyData.CurrencyDisplayInfo