public enum UnitStyle extends Enum<UnitStyle>
| Enum Constant and Description |
|---|
LABEL
The unit will be rendered as its label.
|
NAME
The unit will be rendered as its name.
|
NAME_AND_SYMBOL
The unit will be rendered as its name and symbol.
|
SYMBOL
The unit will be rendered as its symbol.
|
SYMBOL_AND_LABEL
The unit will be rendered as its symbol and also labeled.
|
| Modifier and Type | Method and Description |
|---|---|
static UnitStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UnitStyle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UnitStyle NAME
Unit.getName()public static final UnitStyle SYMBOL
Unit.getSymbol()public static final UnitStyle LABEL
javax.measure.format.UnitFormat#label()public static final UnitStyle NAME_AND_SYMBOL
Unit.getName(),
Unit.getSymbol()public static final UnitStyle SYMBOL_AND_LABEL
Unit.getSymbol(),
javax.measure.format.UnitFormat#label()public static UnitStyle[] values()
for (UnitStyle c : UnitStyle.values()) System.out.println(c);
public static UnitStyle 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 © 2005–2021 Units of Measurement project. All rights reserved.