public static enum NumberFormatter.UnitWidth extends Enum<NumberFormatter.UnitWidth>
This enum is similar to MeasureFormat.FormatWidth
.
NumberFormatter
Enum Constant and Description |
---|
FORMAL
Use the formal variant of the currency symbol; for example, "NT$" for the New Taiwan
dollar in zh-TW.
|
FULL_NAME
Print the full name of the unit, without any abbreviations.
|
HIDDEN
Format the number according to the specified unit, but do not display the unit.
|
ISO_CODE
Use the three-digit ISO XXX code in place of the symbol for displaying currencies.
|
NARROW
Print an abbreviated version of the unit name.
|
SHORT
Print an abbreviated version of the unit name.
|
VARIANT
Use the alternate variant of the currency symbol; for example, "TL" for the Turkish
lira (TRY).
|
Modifier and Type | Method and Description |
---|---|
static NumberFormatter.UnitWidth |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NumberFormatter.UnitWidth[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NumberFormatter.UnitWidth NARROW
In CLDR, this option corresponds to the "Narrow" format for measure units and the "¤¤¤¤¤" placeholder for currencies.
NumberFormatter
public static final NumberFormatter.UnitWidth SHORT
For example, in es-US, the SHORT form for Fahrenheit is "{0} °F", but the NARROW form is "{0}°", since Fahrenheit is the customary unit for temperature in that locale.
In CLDR, this option corresponds to the "Short" format for measure units and the "¤" placeholder for currencies.
NumberFormatter
public static final NumberFormatter.UnitWidth FULL_NAME
In CLDR, this option corresponds to the default format for measure units and the "¤¤¤" placeholder for currencies.
NumberFormatter
public static final NumberFormatter.UnitWidth ISO_CODE
Behavior of this option with non-currency units is not defined at this time.
In CLDR, this option corresponds to the "¤¤" placeholder for currencies.
NumberFormatter
public static final NumberFormatter.UnitWidth FORMAL
Behavior of this option with non-currency units is not defined at this time.
NumberFormatter
public static final NumberFormatter.UnitWidth VARIANT
Behavior of this option with non-currency units is not defined at this time.
NumberFormatter
public static final NumberFormatter.UnitWidth HIDDEN
NumberFormatter
public static NumberFormatter.UnitWidth[] values()
for (NumberFormatter.UnitWidth c : NumberFormatter.UnitWidth.values()) System.out.println(c);
public static NumberFormatter.UnitWidth valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2016 Unicode, Inc. and others.