NumberRangeFormatter.RangeIdentityFallback

public static final enum NumberRangeFormatter.RangeIdentityFallback
extends Enum<NumberRangeFormatter.RangeIdentityFallback>

java.lang.Object
   ↳ java.lang.Enum<android.icu.number.NumberRangeFormatter.RangeIdentityFallback>
     ↳ android.icu.number.NumberRangeFormatter.RangeIdentityFallback


Defines the behavior when the two numbers in the range are identical after rounding. To programmatically detect when the identity fallback is used, compare the lower and upper BigDecimals via FormattedNumber.

Summary

Enum values

NumberRangeFormatter.RangeIdentityFallback  APPROXIMATELY

Show the number using a locale-sensitive approximation pattern. 

NumberRangeFormatter.RangeIdentityFallback  APPROXIMATELY_OR_SINGLE_VALUE

Show the number using a locale-sensitive approximation pattern. 

NumberRangeFormatter.RangeIdentityFallback  RANGE

Show the number as the range of two equal values. 

NumberRangeFormatter.RangeIdentityFallback  SINGLE_VALUE

Show the number as a single value rather than a range. 

Public methods

static NumberRangeFormatter.RangeIdentityFallback valueOf(String name)
static final RangeIdentityFallback[] values()

Inherited methods

Enum values

APPROXIMATELY

Added in API level 30
public static final NumberRangeFormatter.RangeIdentityFallback APPROXIMATELY

Show the number using a locale-sensitive approximation pattern. Use the range pattern always, even if the inputs are the same. Example: "~$5"

APPROXIMATELY_OR_SINGLE_VALUE

Added in API level 30
public static final NumberRangeFormatter.RangeIdentityFallback APPROXIMATELY_OR_SINGLE_VALUE

Show the number using a locale-sensitive approximation pattern. If the numbers were the same before rounding, show the single value. Example: "~$5" or "$5"

RANGE

Added in API level 30
public static final NumberRangeFormatter.RangeIdentityFallback RANGE

Show the number as the range of two equal values. Use the range pattern always, even if the inputs are the same. Example (with RangeCollapse.NONE): "$5 \u2013 $5"

SINGLE_VALUE

Added in API level 30
public static final NumberRangeFormatter.RangeIdentityFallback SINGLE_VALUE

Show the number as a single value rather than a range. Example: "$5"

Public methods

valueOf

public static NumberRangeFormatter.RangeIdentityFallback valueOf (String name)

Parameters
name String

Returns
NumberRangeFormatter.RangeIdentityFallback

values

public static final RangeIdentityFallback[] values ()

Returns
RangeIdentityFallback[]