Package com.ibm.icu.message2
Class DateTimeFormatterFactory.DateTimeFormatter
- java.lang.Object
-
- com.ibm.icu.message2.DateTimeFormatterFactory.DateTimeFormatter
-
- All Implemented Interfaces:
Formatter
- Enclosing class:
- DateTimeFormatterFactory
private static class DateTimeFormatterFactory.DateTimeFormatter extends java.lang.Object implements Formatter
-
-
Field Summary
Fields Modifier and Type Field Description private DateFormat
icuFormatter
private java.util.Locale
locale
-
Constructor Summary
Constructors Modifier Constructor Description private
DateTimeFormatter(java.util.Locale locale, DateFormat df)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormattedPlaceholder
format(java.lang.Object toFormat, java.util.Map<java.lang.String,java.lang.Object> variableOptions)
A method that takes the object to format and returns the i18n-aware formatted placeholder.java.lang.String
formatToString(java.lang.Object toFormat, java.util.Map<java.lang.String,java.lang.Object> variableOptions)
A method that takes the object to format and returns the i18n-aware string representation.
-
-
-
Field Detail
-
icuFormatter
private final DateFormat icuFormatter
-
locale
private final java.util.Locale locale
-
-
Constructor Detail
-
DateTimeFormatter
private DateTimeFormatter(java.util.Locale locale, DateFormat df)
-
-
Method Detail
-
format
public FormattedPlaceholder format(java.lang.Object toFormat, java.util.Map<java.lang.String,java.lang.Object> variableOptions)
A method that takes the object to format and returns the i18n-aware formatted placeholder.
-
formatToString
public java.lang.String formatToString(java.lang.Object toFormat, java.util.Map<java.lang.String,java.lang.Object> variableOptions)
A method that takes the object to format and returns the i18n-aware string representation.- Specified by:
formatToString
in interfaceFormatter
- Parameters:
toFormat
- the object to format.variableOptions
- options that are not know at build time.- Returns:
- the formatted string.
-
-