Top Description Fields Constructors Methods
com.ibm.icu.number

public Class UnlocalizedNumberFormatter

extends NumberFormatterSettings<UnlocalizedNumberFormatter>
Class Inheritance
Imports
java.util.Locale, com.ibm.icu.util.ULocale

A NumberFormatter that does not yet have a locale. In order to format numbers, a locale must be specified. Instances of this class are immutable and thread-safe.
ICU Status
Stable since ICU 60.
See Also
NumberFormatter

Field Summary

Inherited from com.ibm.icu.number.NumberFormatterSettings:
KEY_DECIMALKEY_GROUPINGKEY_INTEGERKEY_LOCALEKEY_MACROSKEY_MAXKEY_NOTATIONKEY_PADDERKEY_PER_UNITKEY_PRECISIONKEY_ROUNDING_MODEKEY_SCALEKEY_SIGNKEY_SYMBOLSKEY_THRESHOLDKEY_UNITKEY_UNIT_DISPLAY_CASEKEY_UNIT_WIDTHKEY_USAGE

Constructor Summary

AccessConstructor and Description
pack-priv
UnlocalizedNumberFormatter()

Base constructor; called during startup only.

pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv UnlocalizedNumberFormatter
public LocalizedNumberFormatter

Returns:

The fluent chain
locale
(Locale
The locale to use when loading data for number formatting.
locale
)

Associate the given locale with the number formatter.

public LocalizedNumberFormatter

Returns:

The fluent chain
locale
(ULocale
The locale to use when loading data for number formatting.
locale
)

ULocale version of the locale(Locale) setter above.

Inherited from com.ibm.icu.number.NumberFormatterSettings:
decimaldisplayOptionsequalsgroupinghashCodeintegerWidthmacrosnotationpaddingperUnitprecisionresolveroundingModescalesignsymbolssymbolsthresholdtoSkeletonunitunitDisplayCaseunitWidthusage

Constructor Detail

UnlocalizedNumberFormatterback to summary
pack-priv UnlocalizedNumberFormatter()

Base constructor; called during startup only. Sets the threshold to the default value of 3.

UnlocalizedNumberFormatterback to summary
pack-priv UnlocalizedNumberFormatter(NumberFormatterSettings<?> parent, int key, Object value)

Method Detail

createback to summary
pack-priv UnlocalizedNumberFormatter create(int key, Object value)

Implements abstract com.ibm.icu.number.NumberFormatterSettings.create.

Annotations
@Override
localeback to summary
public LocalizedNumberFormatter locale(Locale locale)

Associate the given locale with the number formatter. The locale is used for picking the appropriate symbols, formats, and other data for number display.

To use the Java default locale, call Locale.getDefault():

NumberFormatter.with(). ... .locale(Locale.getDefault())
Parameters
locale:Locale

The locale to use when loading data for number formatting.

Returns:LocalizedNumberFormatter

The fluent chain

ICU Status
Stable since ICU 60.
localeback to summary
public LocalizedNumberFormatter locale(ULocale locale)

ULocale version of the locale(Locale) setter above.

Parameters
locale:ULocale

The locale to use when loading data for number formatting.

Returns:LocalizedNumberFormatter

The fluent chain

ICU Status
Stable since ICU 60.
See Also
locale(Locale)