NumberRangeFormatter.RangeCollapse


public static final enum NumberRangeFormatter.RangeCollapse
extends Enum<NumberRangeFormatter.RangeCollapse>

java.lang.Object
   ↳ java.lang.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

NumberRangeFormatter.RangeCollapse  ALL

Collapse any field that is equal across the range sign. 

NumberRangeFormatter.RangeCollapse  AUTO

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

NumberRangeFormatter.RangeCollapse  NONE

Do not collapse any part of the number. 

NumberRangeFormatter.RangeCollapse  UNIT

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

Public methods

static NumberRangeFormatter.RangeCollapse valueOf(String name)
static final RangeCollapse[] values()

Inherited methods

Enum values

ALL

Added in API level 30
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 \u2013 5.3 thousand kilograms"

AUTO

Added in API level 30
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.

NONE

Added in API level 30
public static final NumberRangeFormatter.RangeCollapse NONE

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

UNIT

Added in API level 30
public static final NumberRangeFormatter.RangeCollapse UNIT

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

Public methods

valueOf

public static NumberRangeFormatter.RangeCollapse valueOf (String name)

Parameters
name String

Returns
NumberRangeFormatter.RangeCollapse

values

public static final RangeCollapse[] values ()

Returns
RangeCollapse[]