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

public Class LocalizedNumberRangeFormatter

extends NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>
Class Inheritance
Imports
com.ibm.icu.impl.number.DecimalQuantity, .DecimalQuantity_DualStorageBCD

A NumberRangeFormatter that has a locale associated with it; this means .formatRange() methods are available. Instances of this class are immutable and thread-safe.
Author
sffc
ICU Status
Stable since ICU 63.
See Also
NumberRangeFormatter

Field Summary

Modifier and TypeField and Description
private volatile NumberRangeFormatterImpl
Inherited from com.ibm.icu.number.NumberRangeFormatterSettings:
KEY_COLLAPSEKEY_FORMATTER_1KEY_FORMATTER_2KEY_IDENTITY_FALLBACKKEY_LOCALEKEY_MACROSKEY_MAXKEY_SAME_FORMATTERS

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv LocalizedNumberRangeFormatter
pack-priv FormattedNumberRange
formatImpl(DecimalQuantity first, DecimalQuantity second, boolean equalBeforeRounding)

Deprecated as a consequence of DecimalQuantity being deprecated.
public FormattedNumberRange

Returns:

A FormattedNumberRange object; call .toString() to get the string.
formatRange
(int
The first number in the range, usually to the left in LTR locales.
first
,
int
The second number in the range, usually to the right in LTR locales.
second
)

Format the given integers to a string using the settings specified in the NumberRangeFormatter fluent setting chain.

public FormattedNumberRange

Returns:

A FormattedNumberRange object; call .toString() to get the string.
formatRange
(double
The first number in the range, usually to the left in LTR locales.
first
,
double
The second number in the range, usually to the right in LTR locales.
second
)

Format the given doubles to a string using the settings specified in the NumberRangeFormatter fluent setting chain.

public FormattedNumberRange

Returns:

A FormattedNumberRange object; call .toString() to get the string.
formatRange
(Number
The first number in the range, usually to the left in LTR locales.
first
,
Number
The second number in the range, usually to the right in LTR locales.
second
)

Format the given Numbers to a string using the settings specified in the NumberRangeFormatter fluent setting chain.

Inherited from com.ibm.icu.number.NumberRangeFormatterSettings:
collapseequalshashCodeidentityFallbacknumberFormatterBothnumberFormatterFirstnumberFormatterSecondresolve

Field Detail

fImplback to summary
private volatile NumberRangeFormatterImpl fImpl

Constructor Detail

LocalizedNumberRangeFormatterback to summary
pack-priv LocalizedNumberRangeFormatter(NumberRangeFormatterSettings<?> parent, int key, Object value)

Method Detail

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

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

Annotations
@Override
formatImplback to summary
pack-priv FormattedNumberRange formatImpl(DecimalQuantity first, DecimalQuantity second, boolean equalBeforeRounding)

Deprecated

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

formatRangeback to summary
public FormattedNumberRange formatRange(int first, int second)

Format the given integers to a string using the settings specified in the NumberRangeFormatter fluent setting chain.

Parameters
first:int

The first number in the range, usually to the left in LTR locales.

second:int

The second number in the range, usually to the right in LTR locales.

Returns:FormattedNumberRange

A FormattedNumberRange object; call .toString() to get the string.

ICU Status
Stable since ICU 63.
See Also
NumberRangeFormatter
formatRangeback to summary
public FormattedNumberRange formatRange(double first, double second)

Format the given doubles to a string using the settings specified in the NumberRangeFormatter fluent setting chain.

Parameters
first:double

The first number in the range, usually to the left in LTR locales.

second:double

The second number in the range, usually to the right in LTR locales.

Returns:FormattedNumberRange

A FormattedNumberRange object; call .toString() to get the string.

ICU Status
Stable since ICU 63.
See Also
NumberRangeFormatter
formatRangeback to summary
public FormattedNumberRange formatRange(Number first, Number second)

Format the given Numbers to a string using the settings specified in the NumberRangeFormatter fluent setting chain.

Parameters
first:Number

The first number in the range, usually to the left in LTR locales.

second:Number

The second number in the range, usually to the right in LTR locales.

Returns:FormattedNumberRange

A FormattedNumberRange object; call .toString() to get the string.

Exceptions
IllegalArgumentException:
if first or second is null
ICU Status
Stable since ICU 63.
See Also
NumberRangeFormatter