Package com.ibm.icu.number
Enum NumberRangeFormatter.RangeCollapse
- java.lang.Object
-
- java.lang.Enum<NumberRangeFormatter.RangeCollapse>
-
- com.ibm.icu.number.NumberRangeFormatter.RangeCollapse
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<NumberRangeFormatter.RangeCollapse>
- Enclosing class:
- NumberRangeFormatter
public static enum NumberRangeFormatter.RangeCollapse extends java.lang.Enum<NumberRangeFormatter.RangeCollapse>
Defines how to merge fields that are identical across the range sign.- See Also:
NumberRangeFormatter
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL
Collapse any field that is equal across the range sign.AUTO
Use locale data and heuristics to determine how much of the string to collapse.NONE
Do not collapse any part of the number.UNIT
Collapse the unit part of the number, but not the notation, if present.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NumberRangeFormatter.RangeCollapse
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static NumberRangeFormatter.RangeCollapse[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTO
public static final NumberRangeFormatter.RangeCollapse AUTO
Use locale data and heuristics to determine how much of the string to collapse. Could end up collapsing none, some, or all repeated pieces in a locale-sensitive way.The heuristics used for this option are subject to change over time.
- See Also:
NumberRangeFormatter
-
NONE
public static final NumberRangeFormatter.RangeCollapse NONE
Do not collapse any part of the number. Example: "3.2 thousand kilograms – 5.3 thousand kilograms"- See Also:
NumberRangeFormatter
-
UNIT
public static final NumberRangeFormatter.RangeCollapse UNIT
Collapse the unit part of the number, but not the notation, if present. Example: "3.2 thousand – 5.3 thousand kilograms"- See Also:
NumberRangeFormatter
-
ALL
public static final NumberRangeFormatter.RangeCollapse ALL
Collapse any field that is equal across the range sign. May introduce ambiguity on the magnitude of the number. Example: "3.2 – 5.3 thousand kilograms"- See Also:
NumberRangeFormatter
-
-
Method Detail
-
values
public static NumberRangeFormatter.RangeCollapse[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NumberRangeFormatter.RangeCollapse c : NumberRangeFormatter.RangeCollapse.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NumberRangeFormatter.RangeCollapse valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-