NumberFormatter.DecimalSeparatorDisplay


public static final enum NumberFormatter.DecimalSeparatorDisplay
extends Enum<NumberFormatter.DecimalSeparatorDisplay>

java.lang.Object
   ↳ java.lang.Enum<android.icu.number.NumberFormatter.DecimalSeparatorDisplay>
     ↳ android.icu.number.NumberFormatter.DecimalSeparatorDisplay


An enum declaring how to render the decimal separator. Example outputs when formatting 1 and 1.1 in en-US:

  • AUTO: "1" and "1.1"
  • ALWAYS: "1." and "1.1"

See also:

Summary

Enum values

NumberFormatter.DecimalSeparatorDisplay  ALWAYS

Always show the decimal separator, even if there are no digits to display after the separator. 

NumberFormatter.DecimalSeparatorDisplay  AUTO

Show the decimal separator when there are one or more digits to display after the separator, and do not show it otherwise. 

Public methods

static NumberFormatter.DecimalSeparatorDisplay valueOf(String name)
static final DecimalSeparatorDisplay[] values()

Inherited methods

Enum values

ALWAYS

Added in API level 30
public static final NumberFormatter.DecimalSeparatorDisplay ALWAYS

Always show the decimal separator, even if there are no digits to display after the separator.

See also:

AUTO

Added in API level 30
public static final NumberFormatter.DecimalSeparatorDisplay AUTO

Show the decimal separator when there are one or more digits to display after the separator, and do not show it otherwise. This is the default behavior.

See also:

Public methods

valueOf

public static NumberFormatter.DecimalSeparatorDisplay valueOf (String name)

Parameters
name String

Returns
NumberFormatter.DecimalSeparatorDisplay

values

public static final DecimalSeparatorDisplay[] values ()

Returns
DecimalSeparatorDisplay[]