Package com.ibm.icu.number
Class UnlocalizedNumberFormatter
- java.lang.Object
-
- com.ibm.icu.number.NumberFormatterSettings<UnlocalizedNumberFormatter>
-
- com.ibm.icu.number.UnlocalizedNumberFormatter
-
public class UnlocalizedNumberFormatter extends NumberFormatterSettings<UnlocalizedNumberFormatter>
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.- See Also:
NumberFormatter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalizedNumberFormatter
locale(ULocale locale)
ULocale version of thelocale(Locale)
setter above.LocalizedNumberFormatter
locale(java.util.Locale locale)
Associate the given locale with the number formatter.
-
-
-
Method Detail
-
locale
public LocalizedNumberFormatter locale(java.util.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
- The locale to use when loading data for number formatting.- Returns:
- The fluent chain
-
locale
public LocalizedNumberFormatter locale(ULocale locale)
ULocale version of thelocale(Locale)
setter above.- Parameters:
locale
- The locale to use when loading data for number formatting.- Returns:
- The fluent chain
- See Also:
locale(Locale)
-
-