Class NumberFunctionFactory.NumberFunctionImpl
java.lang.Object
com.ibm.icu.message2.NumberFunctionFactory.NumberFunctionImpl
- All Implemented Interfaces:
Function
- Enclosing class:
NumberFunctionFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LocalizedNumberFormatterprivate final Stringprivate final Localeprivate static final Stringprivate final PluralRules -
Constructor Summary
ConstructorsConstructorDescriptionNumberFunctionImpl(Locale locale, PluralRules rules, Map<String, Object> fixedOptions, String kind) -
Method Summary
Modifier and TypeMethodDescriptionA method that takes the object to format and returns the i18n-aware formatted placeholder.formatToString(Object toFormat, Map<String, Object> variableOptions) A method that takes the object to format and returns the i18n-aware string representation.(package private) LocalizedNumberFormatterprivate booleanA method that is invoked for the object to match on each key.private static intpluralComparator(String o1, String o2) private NumberresolveValue(Object toFormat, Map<String, Object> variableOptions)
-
Field Details
-
NO_MATCH
- See Also:
-
locale
-
fixedOptions
-
icuFormatter
-
kind
-
rules
-
-
Constructor Details
-
NumberFunctionImpl
-
-
Method Details
-
getIcuFormatter
LocalizedNumberFormatter getIcuFormatter() -
formatToString
A method that takes the object to format and returns the i18n-aware string representation.- Specified by:
formatToStringin interfaceFunction- Parameters:
toFormat- the object to format.variableOptions- options that are not know at build time.- Returns:
- the formatted string.
-
format
A method that takes the object to format and returns the i18n-aware formatted placeholder. -
matches
A method that is invoked for the object to match on each key.For example, an English plural
matcheswould returntrueformatches(1, "1"),matches(1, "one"), andmatches(1, "*"). -
pluralComparator
-
matches
-
resolveValue
-