Enum NumberRangeFormatter.RangeCollapse

    • 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
        Status:
        Stable ICU 63.
      • 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
        Status:
        Stable ICU 63.
    • 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​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null