NumberFormatter.TrailingZeroDisplay


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

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


An enum declaring how to render trailing zeros.

  • AUTO: 0.90, 1.00, 1.10
  • HIDE_IF_WHOLE: 0.90, 1, 1.10

Summary

Enum values

NumberFormatter.TrailingZeroDisplay  AUTO

Display trailing zeros according to the settings for minimum fraction and significant digits. 

NumberFormatter.TrailingZeroDisplay  HIDE_IF_WHOLE

Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero. 

Public methods

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

Inherited methods

Enum values

AUTO

Added in API level 34
public static final NumberFormatter.TrailingZeroDisplay AUTO

Display trailing zeros according to the settings for minimum fraction and significant digits.

HIDE_IF_WHOLE

Added in API level 34
public static final NumberFormatter.TrailingZeroDisplay HIDE_IF_WHOLE

Same as AUTO, but hide trailing zeros after the decimal separator if they are all zero.

Public methods

valueOf

public static NumberFormatter.TrailingZeroDisplay valueOf (String name)

Parameters
name String

Returns
NumberFormatter.TrailingZeroDisplay

values

public static final TrailingZeroDisplay[] values ()

Returns
TrailingZeroDisplay[]