Enum NumberRangeFormatter.RangeCollapse

java.lang.Object
java.lang.Enum<NumberRangeFormatter.RangeCollapse>
com.ibm.icu.number.NumberRangeFormatter.RangeCollapse
All Implemented Interfaces:
Serializable, Comparable<NumberRangeFormatter.RangeCollapse>
Enclosing class:
NumberRangeFormatter

public static enum NumberRangeFormatter.RangeCollapse extends Enum<NumberRangeFormatter.RangeCollapse>
Defines how to merge fields that are identical across the range sign.
Author:
sffc
See Also:
Status:
Stable ICU 63.
  • Enum Constant Details

    • 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:
      Status:
      Stable ICU 63.
    • 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:
      Status:
      Stable ICU 63.
    • 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:
      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:
      Status:
      Stable ICU 63.
  • Method Details

    • values

      public static NumberRangeFormatter.RangeCollapse[] 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

      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