Added in API level 30

RangeCollapse


class RangeCollapse
kotlin.Any
   ↳ kotlin.Enum<android.icu.number.NumberRangeFormatter.RangeCollapse>
   ↳ android.icu.number.NumberRangeFormatter.RangeCollapse

Defines how to merge fields that are identical across the range sign.

Summary

Enum values

Collapse any field that is equal across the range sign.

Use locale data and heuristics to determine how much of the string to collapse.

Do not collapse any part of the number.

Collapse the unit part of the number, but not the notation, if present.

Enum values

ALL

Added in API level 30
enum val ALL : NumberRangeFormatter.RangeCollapse

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"

AUTO

Added in API level 30
enum val AUTO : NumberRangeFormatter.RangeCollapse

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.

NONE

Added in API level 30
enum val NONE : NumberRangeFormatter.RangeCollapse

Do not collapse any part of the number. Example: "3.2 thousand kilograms – 5.3 thousand kilograms"

UNIT

Added in API level 30
enum val UNIT : NumberRangeFormatter.RangeCollapse

Collapse the unit part of the number, but not the notation, if present. Example: "3.2 thousand – 5.3 thousand kilograms"