Package com.ibm.icu.impl.duration.impl
Class ResourceBasedPeriodFormatterDataService
java.lang.Object
com.ibm.icu.impl.duration.impl.PeriodFormatterDataService
com.ibm.icu.impl.duration.impl.ResourceBasedPeriodFormatterDataService
A PeriodFormatterDataService that serves PeriodFormatterData objects based on
data files stored as resources in this directory. These are text files named
after the locale, for example, 'pfd_he_IL.txt' specifies an period formatter
data file for Hebrew as spoken in Israel. Data is in a JSON-like format.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection<String>
private Map<String,
PeriodFormatterData> private PeriodFormatterData
private String
private static final String
private static final ResourceBasedPeriodFormatterDataService
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Constructs the service. -
Method Summary
Modifier and TypeMethodDescriptionReturns a PeriodFormatterData for the given locale name.Returns a collection of all the locale names supported by this service.Returns the singleton instance of this class.
-
Field Details
-
availableLocales
-
lastData
-
lastLocale
-
cache
-
PATH
- See Also:
-
singleton
-
-
Constructor Details
-
ResourceBasedPeriodFormatterDataService
private ResourceBasedPeriodFormatterDataService()Constructs the service.
-
-
Method Details
-
getInstance
Returns the singleton instance of this class. -
get
Description copied from class:PeriodFormatterDataService
Returns a PeriodFormatterData for the given locale name.- Specified by:
get
in classPeriodFormatterDataService
- Parameters:
localeName
- the name of the locale- Returns:
- a PeriodFormatterData object
-
getAvailableLocales
Description copied from class:PeriodFormatterDataService
Returns a collection of all the locale names supported by this service.- Specified by:
getAvailableLocales
in classPeriodFormatterDataService
- Returns:
- a collection of locale names, as String
-