Package com.ibm.icu.impl.duration
Class BasicPeriodFormatter
java.lang.Object
com.ibm.icu.impl.duration.BasicPeriodFormatter
- All Implemented Interfaces:
PeriodFormatter
Core implementation class for PeriodFormatter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PeriodFormatterData
private BasicPeriodFormatterFactory
private String
-
Constructor Summary
ConstructorsConstructorDescriptionBasicPeriodFormatter
(BasicPeriodFormatterFactory factory, String localeName, PeriodFormatterData data, BasicPeriodFormatterFactory.Customizations customs) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
format
(int tl, boolean inFuture, int[] counts) Format a Period.withLocale
(String locName) Return a new PeriodFormatter with the same customizations but using data for a new locale.
-
Field Details
-
factory
-
localeName
-
data
-
customs
-
-
Constructor Details
-
BasicPeriodFormatter
BasicPeriodFormatter(BasicPeriodFormatterFactory factory, String localeName, PeriodFormatterData data, BasicPeriodFormatterFactory.Customizations customs)
-
-
Method Details
-
format
Description copied from interface:PeriodFormatter
Format a Period.- Specified by:
format
in interfacePeriodFormatter
- Returns:
- the formatted time
-
withLocale
Description copied from interface:PeriodFormatter
Return a new PeriodFormatter with the same customizations but using data for a new locale. Some locales impose limits on the fields that can be directly formatter.- Specified by:
withLocale
in interfacePeriodFormatter
- Parameters:
locName
- the name of the new locale- Returns:
- a new formatter for the given locale
-
format
-