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.
See also:
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
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"
See also:
APPROXIMATELY_OR_SINGLE_VALUE
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"
See also:
RANGE
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"
See also:
SINGLE_VALUE
public static final NumberRangeFormatter.RangeIdentityFallback SINGLE_VALUE
Show the number as a single value rather than a range. Example: "$5"
See also:
Public methods
valueOf
public static NumberRangeFormatter.RangeIdentityFallback valueOf (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
NumberRangeFormatter.RangeIdentityFallback |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-18 UTC.