Package com.ibm.icu.impl.duration
Class BasicPeriodFormatterService
- java.lang.Object
-
- com.ibm.icu.impl.duration.BasicPeriodFormatterService
-
- All Implemented Interfaces:
PeriodFormatterService
public class BasicPeriodFormatterService extends java.lang.Object implements PeriodFormatterService
An implementation of PeriodFormatterService that constructs a BasicPeriodFormatterFactory.
-
-
Field Summary
Fields Modifier and Type Field Description private PeriodFormatterDataService
ds
private static BasicPeriodFormatterService
instance
-
Constructor Summary
Constructors Constructor Description BasicPeriodFormatterService(PeriodFormatterDataService ds)
Construct a BasicPeriodFormatterService using the given PeriodFormatterDataService.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.String>
getAvailableLocaleNames()
Return the names of locales supported by factories produced by this service.static BasicPeriodFormatterService
getInstance()
Return the default service instance.DurationFormatterFactory
newDurationFormatterFactory()
Creates a new factory for creating DurationFormatters.PeriodBuilderFactory
newPeriodBuilderFactory()
Creates a new factory for creating PeriodBuilders.PeriodFormatterFactory
newPeriodFormatterFactory()
Creates a new factory for creating PeriodFormatters.
-
-
-
Field Detail
-
instance
private static BasicPeriodFormatterService instance
-
ds
private PeriodFormatterDataService ds
-
-
Constructor Detail
-
BasicPeriodFormatterService
public BasicPeriodFormatterService(PeriodFormatterDataService ds)
Construct a BasicPeriodFormatterService using the given PeriodFormatterDataService.- Parameters:
ds
- the data service to use
-
-
Method Detail
-
getInstance
public static BasicPeriodFormatterService getInstance()
Return the default service instance. This uses the default data service.- Returns:
- an BasicPeriodFormatterService
-
newDurationFormatterFactory
public DurationFormatterFactory newDurationFormatterFactory()
Description copied from interface:PeriodFormatterService
Creates a new factory for creating DurationFormatters.- Specified by:
newDurationFormatterFactory
in interfacePeriodFormatterService
- Returns:
- a new DurationFormatterFactory.
-
newPeriodFormatterFactory
public PeriodFormatterFactory newPeriodFormatterFactory()
Description copied from interface:PeriodFormatterService
Creates a new factory for creating PeriodFormatters.- Specified by:
newPeriodFormatterFactory
in interfacePeriodFormatterService
- Returns:
- a new PeriodFormatterFactory
-
newPeriodBuilderFactory
public PeriodBuilderFactory newPeriodBuilderFactory()
Description copied from interface:PeriodFormatterService
Creates a new factory for creating PeriodBuilders.- Specified by:
newPeriodBuilderFactory
in interfacePeriodFormatterService
- Returns:
- a new PeriodBuilderFactory
-
getAvailableLocaleNames
public java.util.Collection<java.lang.String> getAvailableLocaleNames()
Description copied from interface:PeriodFormatterService
Return the names of locales supported by factories produced by this service.- Specified by:
getAvailableLocaleNames
in interfacePeriodFormatterService
- Returns:
- a collection of String (locale names)
-
-