Package com.ibm.icu.number
Class NumberPropertyMapper
java.lang.Object
com.ibm.icu.number.NumberPropertyMapper
This class, as well as NumberFormatterImpl, could go into the impl package, but they depend on too many package-private members of the public APIs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UnlocalizedNumberFormatter
create
(DecimalFormatProperties properties, DecimalFormatSymbols symbols) Convenience method to create a NumberFormatter directly from Properties.static UnlocalizedNumberFormatter
create
(DecimalFormatProperties properties, DecimalFormatSymbols symbols, DecimalFormatProperties exportedProperties) Convenience method to create a NumberFormatter directly from Properties.static UnlocalizedNumberFormatter
create
(String pattern, DecimalFormatSymbols symbols) Convenience method to create a NumberFormatter directly from a pattern string.static MacroProps
oldToNew
(DecimalFormatProperties properties, DecimalFormatSymbols symbols, DecimalFormatProperties exportedProperties) Creates a newMacroProps
object based on the content of aDecimalFormatProperties
object.
-
Constructor Details
-
NumberPropertyMapper
NumberPropertyMapper()
-
-
Method Details
-
create
public static UnlocalizedNumberFormatter create(DecimalFormatProperties properties, DecimalFormatSymbols symbols) Convenience method to create a NumberFormatter directly from Properties. -
create
public static UnlocalizedNumberFormatter create(DecimalFormatProperties properties, DecimalFormatSymbols symbols, DecimalFormatProperties exportedProperties) Convenience method to create a NumberFormatter directly from Properties. -
create
Convenience method to create a NumberFormatter directly from a pattern string. Something like this could become public API if there is demand. NOTE: This appears to be dead code. -
oldToNew
public static MacroProps oldToNew(DecimalFormatProperties properties, DecimalFormatSymbols symbols, DecimalFormatProperties exportedProperties) Creates a newMacroProps
object based on the content of aDecimalFormatProperties
object. In other words, maps Properties to MacroProps. This function is used by the JDK-compatibility API to call into the ICU 60 fluent number formatting pipeline.- Parameters:
properties
- The property bag to be mapped.symbols
- The symbols associated with the property bag.exportedProperties
- A property bag in which to store validated properties. Used by some DecimalFormat getters.- Returns:
- A new MacroProps containing all of the information in the Properties.
-