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 PeriodFormatterDataprivate BasicPeriodFormatterFactoryprivate String -
Constructor Summary
ConstructorsConstructorDescriptionBasicPeriodFormatter(BasicPeriodFormatterFactory factory, String localeName, PeriodFormatterData data, BasicPeriodFormatterFactory.Customizations customs) -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringformat(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:PeriodFormatterFormat a Period.- Specified by:
formatin interfacePeriodFormatter- Returns:
- the formatted time
-
withLocale
Description copied from interface:PeriodFormatterReturn 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:
withLocalein interfacePeriodFormatter- Parameters:
locName- the name of the new locale- Returns:
- a new formatter for the given locale
-
format
-