public enum MassUnit extends Enum<MassUnit>
Enum Constant and Description |
---|
DEFAULT |
GRAM |
KG |
LB |
MILLIGRAM |
OUNCE |
SHORT_TON |
TON |
TONNE |
Modifier and Type | Field and Description |
---|---|
int |
value |
Modifier and Type | Method and Description |
---|---|
static MassUnit |
fromValue(int value) |
static MassUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MassUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MassUnit DEFAULT
public static final MassUnit MILLIGRAM
public static final MassUnit GRAM
public static final MassUnit KG
public static final MassUnit TONNE
public static final MassUnit OUNCE
public static final MassUnit LB
public static final MassUnit SHORT_TON
public static final MassUnit TON
public static MassUnit[] values()
for (MassUnit c : MassUnit.values()) System.out.println(c);
public static MassUnit 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 nullpublic static MassUnit fromValue(int value)
Copyright © 2022. All rights reserved.