Interface NumberSymbolProvider


public interface NumberSymbolProvider

This SPI-interface enables the access to localized number properties like zero digits and is instantiated via a ServiceLoader-mechanism.

If there is no external NumberSymbolProvider then Time4J will just delegate to the internal resources or to the JDK.

Note: All implementations must have a public no-arg constructor.

Since:
2.1
Author:
Meno Hochschild
See Also:
ServiceLoader, DecimalFormatSymbols.getZeroDigit()
  • Field Details

  • Method Details

    • getAvailableLocales

      Locale[] getAvailableLocales()

      Yields the supported languages.

      Returns:
      Locale-array
    • getZeroDigit

      char getZeroDigit(Locale locale)

      Returns the localized zero digit.

      Parameters:
      locale - language and country setting
      Returns:
      zero digit of associated numbering system
    • getDecimalSeparator

      char getDecimalSeparator(Locale locale)

      Returns the localized decimal separator.

      Parameters:
      locale - language and country setting
      Returns:
      localized decimal separator
    • getPlusSign

      default String getPlusSign(Locale locale)

      Returns the localized plus sign.

      Parameters:
      locale - language and country setting
      Returns:
      localized plus sign, possibly including RLM- or LRM-markers
      Since:
      3.13/4.10
    • getMinusSign

      String getMinusSign(Locale locale)

      Returns the localized minus sign.

      Parameters:
      locale - language and country setting
      Returns:
      localized minus sign, possibly including RLM- or LRM-markers
    • getDefaultNumberSystem

      default NumberSystem getDefaultNumberSystem(Locale locale)

      Obtains the standard number system for given locale.

      The default implementation is independent on the locale and simply yields NumberSystem.ARABIC.

      Parameters:
      locale - language and country setting
      Returns:
      default number system
      Throws:
      IllegalStateException - if the number system cannot be determined
      Since:
      3.23/4.19