Package net.time4j.format
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 Summary
Modifier and TypeFieldDescriptionstatic NumberSymbolProvider
Default provider which delegates to standard JVM resources. -
Method Summary
Modifier and TypeMethodDescriptionLocale[]
Yields the supported languages.char
getDecimalSeparator(Locale locale)
Returns the localized decimal separator.default NumberSystem
getDefaultNumberSystem(Locale locale)
Obtains the standard number system for given locale.getMinusSign(Locale locale)
Returns the localized minus sign.default String
getPlusSign(Locale locale)
Returns the localized plus sign.char
getZeroDigit(Locale locale)
Returns the localized zero digit.
-
Field Details
-
DEFAULT
Default provider which delegates to standard JVM resources.
- See Also:
DecimalFormatSymbols
-
-
Method Details
-
getAvailableLocales
Locale[] getAvailableLocales()Yields the supported languages.
- Returns:
- Locale-array
-
getZeroDigit
Returns the localized zero digit.
- Parameters:
locale
- language and country setting- Returns:
- zero digit of associated numbering system
-
getDecimalSeparator
Returns the localized decimal separator.
- Parameters:
locale
- language and country setting- Returns:
- localized decimal separator
-
getPlusSign
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
Returns the localized minus sign.
- Parameters:
locale
- language and country setting- Returns:
- localized minus sign, possibly including RLM- or LRM-markers
-
getDefaultNumberSystem
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
-