Enum NumberRangeFormatter.RangeIdentityFallback
java.lang.Object
java.lang.Enum<NumberRangeFormatter.RangeIdentityFallback>
com.ibm.icu.number.NumberRangeFormatter.RangeIdentityFallback
- All Implemented Interfaces:
Serializable, Comparable<NumberRangeFormatter.RangeIdentityFallback>
- Enclosing class:
NumberRangeFormatter
public static enum NumberRangeFormatter.RangeIdentityFallback
extends Enum<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.
- Author:
- sffc
- See Also:
- Status:
- Stable ICU 63.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionShow the number using a locale-sensitive approximation pattern.Show the number using a locale-sensitive approximation pattern.Show the number as the range of two equal values.Show the number as a single value rather than a range. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SINGLE_VALUE
Show the number as a single value rather than a range. Example: "$5"- See Also:
- Status:
- Stable ICU 63.
-
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:
- Status:
- Stable ICU 63.
-
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:
- Status:
- Stable ICU 63.
-
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 – $5"- See Also:
- Status:
- Stable ICU 63.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-