Package com.ibm.icu.message2
Class NumberFormatterFactory.NumberFormatterImpl
- java.lang.Object
-
- com.ibm.icu.message2.NumberFormatterFactory.NumberFormatterImpl
-
- All Implemented Interfaces:
Formatter
- Enclosing class:
- NumberFormatterFactory
static class NumberFormatterFactory.NumberFormatterImpl extends java.lang.Object implements Formatter
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
advanced
private java.util.Map<java.lang.String,java.lang.Object>
fixedOptions
private LocalizedNumberFormatter
icuFormatter
private java.lang.String
kind
private java.util.Locale
locale
-
Constructor Summary
Constructors Constructor Description NumberFormatterImpl(java.util.Locale locale, java.util.Map<java.lang.String,java.lang.Object> fixedOptions, java.lang.String kind)
-
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.(package private) LocalizedNumberFormatter
getIcuFormatter()
-
-
-
Field Detail
-
locale
private final java.util.Locale locale
-
fixedOptions
private final java.util.Map<java.lang.String,java.lang.Object> fixedOptions
-
icuFormatter
private final LocalizedNumberFormatter icuFormatter
-
kind
private final java.lang.String kind
-
advanced
final boolean advanced
-
-
Method Detail
-
getIcuFormatter
LocalizedNumberFormatter getIcuFormatter()
-
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.
-
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.
-
-