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.
- Author:
- sffc
- See Also:
- Status:
- Stable ICU 63.
-
Method Summary
Modifier and TypeMethodDescriptionULocale version of thelocale(Locale)setter above.Associate the given locale with the number range formatter.Methods inherited from class NumberRangeFormatterSettings
collapse, equals, hashCode, identityFallback, numberFormatterBoth, numberFormatterFirst, numberFormatterSecondModifier and TypeMethodDescriptioncollapse(NumberRangeFormatter.RangeCollapse collapse) Sets the aggressiveness of "collapsing" fields across the range separator.booleaninthashCode()identityFallback(NumberRangeFormatter.RangeIdentityFallback identityFallback) Sets the behavior when the two sides of the range are the same.numberFormatterBoth(UnlocalizedNumberFormatter formatter) Sets the NumberFormatter instance to use for the numbers in the range.numberFormatterFirst(UnlocalizedNumberFormatter formatterFirst) Sets the NumberFormatter instance to use for the first number in the range.numberFormatterSecond(UnlocalizedNumberFormatter formatterSecond) Sets the NumberFormatter instances to use for the second number in the range.
-
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
- Status:
- Stable ICU 63.
-
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:
- Status:
- Stable ICU 63.
-