Top Description Inners Constructors Methods
com.ibm.icu.message2

pack-priv Class NumberFormatterFactory

extends Object
implements FormatterFactory
Class Inheritance
All Implemented Interfaces
com.ibm.icu.message2.FormatterFactory
Imports
java.util.HashMap, .Locale, .Map, .Objects, com.ibm.icu.math.BigDecimal, com.ibm.icu.number.LocalizedNumberFormatter, .NumberFormatter, .Precision, .UnlocalizedNumberFormatter, com.ibm.icu.text.FormattedValue, com.ibm.icu.util.CurrencyAmount

Deprecated

as a consequence of FormatterFactory being deprecated. See corresponding docs for further information.

Creates a Formatter doing numeric formatting, similar to {exp, number} in com.ibm.icu.text.MessageFormat.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
NumberFormatterFactory.NumberFormatterImpl

Deprecated as a consequence of Formatter being deprecated.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Formatter
createFormatter(Locale
the locale to use for formatting.
locale
,
Map<String, Object>
the options to use for formatting. The keys and values are function dependent.
fixedOptions
)

Implements com.ibm.icu.message2.FormatterFactory.createFormatter.

Deprecated as a consequence of Formatter being deprecated.
The method that is called to create a formatter.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NumberFormatterFactoryback to summary
pack-priv NumberFormatterFactory()

Method Detail

createFormatterback to summary
public Formatter createFormatter(Locale locale, Map<String, Object> fixedOptions)

Implements com.ibm.icu.message2.FormatterFactory.createFormatter.

Doc from com.ibm.icu.message2.FormatterFactory.createFormatter.

Deprecated

as a consequence of Formatter being deprecated. See corresponding docs for further information.

The method that is called to create a formatter.

Parameters
locale:Locale

the locale to use for formatting.

fixedOptions:Map<String, Object>

the options to use for formatting. The keys and values are function dependent.

Returns:Formatter

the formatter.

Annotations
@Override
com.ibm.icu.message2 back to summary

pack-priv Class NumberFormatterFactory.NumberFormatterImpl

extends Object
implements Formatter
Class Inheritance
  • java.lang.Object
  • com.ibm.icu.message2.NumberFormatterFactory.NumberFormatterImpl
All Implemented Interfaces
com.ibm.icu.message2.Formatter

Deprecated

as a consequence of Formatter being deprecated. See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
private final Map<String, Object>
private final LocalizedNumberFormatter
private final Locale

Constructor Summary

AccessConstructor and Description
pack-priv
NumberFormatterImpl(Locale locale, Map<String, Object> fixedOptions)

Method Summary

Modifier and TypeMethod and Description
public FormattedPlaceholder
format(Object
the object to format.
toFormat
,
Map<String, Object>
options that are not know at build time.
variableOptions
)

Implements com.ibm.icu.message2.Formatter.format.

Deprecated as a consequence of FormattedPlaceholder being deprecated.
A method that takes the object to format and returns the i18n-aware formatted placeholder.
private static LocalizedNumberFormatter
formatterForOptions(Locale locale, Map<String, Object> fixedOptions)

public String
formatToString(Object
the object to format.
toFormat
,
Map<String, Object>
options that are not know at build time.
variableOptions
)

Implements com.ibm.icu.message2.Formatter.formatToString.

A method that takes the object to format and returns the i18n-aware string representation.
pack-priv LocalizedNumberFormatter
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

advancedback to summary
pack-priv final boolean advanced
fixedOptionsback to summary
private final Map<String, Object> fixedOptions
icuFormatterback to summary
private final LocalizedNumberFormatter icuFormatter
localeback to summary
private final Locale locale

Constructor Detail

NumberFormatterImplback to summary
pack-priv NumberFormatterImpl(Locale locale, Map<String, Object> fixedOptions)

Method Detail

formatback to summary
public FormattedPlaceholder format(Object toFormat, Map<String, Object> variableOptions)

Implements com.ibm.icu.message2.Formatter.format.

Doc from com.ibm.icu.message2.Formatter.format.

Deprecated

as a consequence of FormattedPlaceholder being deprecated. See corresponding docs for further information.

A method that takes the object to format and returns the i18n-aware formatted placeholder.

Parameters
toFormat:Object

the object to format.

variableOptions:Map<String, Object>

options that are not know at build time.

Returns:FormattedPlaceholder

the formatted placeholder.

Annotations
@Override
formatterForOptionsback to summary
private static LocalizedNumberFormatter formatterForOptions(Locale locale, Map<String, Object> fixedOptions)
formatToStringback to summary
public String formatToString(Object toFormat, Map<String, Object> variableOptions)

Implements com.ibm.icu.message2.Formatter.formatToString.

Doc from com.ibm.icu.message2.Formatter.formatToString.

A method that takes the object to format and returns the i18n-aware string representation.

Parameters
toFormat:Object

the object to format.

variableOptions:Map<String, Object>

options that are not know at build time.

Returns:String

the formatted string.

Annotations
@Override
getIcuFormatterback to summary
pack-priv LocalizedNumberFormatter getIcuFormatter()