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
-
public class ResourceBasedPeriodFormatterDataService extends PeriodFormatterDataService
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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PeriodFormatterDataget(String localeName)Returns a PeriodFormatterData for the given locale name.Collection<String>getAvailableLocales()Returns a collection of all the locale names supported by this service.static ResourceBasedPeriodFormatterDataServicegetInstance()Returns the singleton instance of this class.
-
-
-
Method Detail
-
getInstance
public static ResourceBasedPeriodFormatterDataService getInstance()
Returns the singleton instance of this class.
-
get
public PeriodFormatterData get(String localeName)
Description copied from class:PeriodFormatterDataServiceReturns a PeriodFormatterData for the given locale name.- Specified by:
getin classPeriodFormatterDataService- Parameters:
localeName- the name of the locale- Returns:
- a PeriodFormatterData object
-
getAvailableLocales
public Collection<String> getAvailableLocales()
Description copied from class:PeriodFormatterDataServiceReturns a collection of all the locale names supported by this service.- Specified by:
getAvailableLocalesin classPeriodFormatterDataService- Returns:
- a collection of locale names, as String
-
-