# Print output for @column tags ?> LocalizedNumberRangeFormatter - Android SDK | Android Developers

Most visited


Recently visited


LocalizedNumberRangeFormatter

public class LocalizedNumberRangeFormatter
extends NumberRangeFormatterSettings<LocalizedNumberRangeFormatter>

java.lang.Object
   ↳ android.icu.number.NumberRangeFormatterSettings<android.icu.number.LocalizedNumberRangeFormatter>
     ↳ android.icu.number.LocalizedNumberRangeFormatter


A NumberRangeFormatter that has a locale associated with it; this means .formatRange() methods are available. Instances of this class are immutable and thread-safe.

See also:

Summary


Public methods

FormattedNumberRange formatRange(int first, int second)

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

FormattedNumberRange formatRange(Number first, Number second)

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

FormattedNumberRange formatRange(double first, double second)

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

Inherited methods

Public methods


formatRange

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.

See also:

formatRange

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.

Throws
IllegalArgumentException if first or second is null

See also:

formatRange

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.

See also:

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.