Package com.ibm.icu.number
Class UnlocalizedNumberRangeFormatter
java.lang.Object
com.ibm.icu.number.NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>
com.ibm.icu.number.UnlocalizedNumberRangeFormatter
public class UnlocalizedNumberRangeFormatter
extends NumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>
A NumberRangeFormatter that does not yet have a locale. In order to format, a locale must be specified.
Instances of this class are immutable and thread-safe.
- See Also:
-
Field Summary
Fields inherited from class com.ibm.icu.number.NumberRangeFormatterSettings
KEY_COLLAPSE, KEY_FORMATTER_1, KEY_FORMATTER_2, KEY_IDENTITY_FALLBACK, KEY_LOCALE, KEY_MACROS, KEY_MAX, KEY_SAME_FORMATTERS
-
Constructor Summary
ConstructorsConstructorDescriptionBase constructor; called during startup only.UnlocalizedNumberRangeFormatter
(NumberRangeFormatterSettings<?> parent, int key, Object value) -
Method Summary
Modifier and TypeMethodDescription(package private) UnlocalizedNumberRangeFormatter
ULocale version of thelocale(Locale)
setter above.Associate the given locale with the number range formatter.Methods inherited from class com.ibm.icu.number.NumberRangeFormatterSettings
collapse, equals, hashCode, identityFallback, numberFormatterBoth, numberFormatterFirst, numberFormatterSecond, resolve
-
Constructor Details
-
UnlocalizedNumberRangeFormatter
UnlocalizedNumberRangeFormatter()Base constructor; called during startup only. -
UnlocalizedNumberRangeFormatter
UnlocalizedNumberRangeFormatter(NumberRangeFormatterSettings<?> parent, int key, Object value)
-
-
Method Details
-
locale
Associate the given locale with the number range 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 range formatting.- Returns:
- The fluent chain
-
locale
ULocale version of thelocale(Locale)
setter above.- Parameters:
locale
- The locale to use when loading data for number range formatting.- Returns:
- The fluent chain
- See Also:
-
create
- Specified by:
create
in classNumberRangeFormatterSettings<UnlocalizedNumberRangeFormatter>
-