|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<WeightUnit>
org.openwms.common.domain.values.WeightUnit
public enum WeightUnit
A WeightUnit is a concrete set of all possible weights.
In SI format.
Enum Constant Summary | |
---|---|
G
Gram. |
|
KG
Kilogram. |
|
MG
Milligram. |
|
T
Tons. |
Method Summary | |
---|---|
List<UnitType> |
getAll()
Return all sub types of the UnitType . |
UnitType |
getBaseUnit()
Return the base unit type of the UnitType . |
long |
getBaseUnitValue()
Return the value of the base unit. |
static WeightUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static WeightUnit[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final WeightUnit MG
public static final WeightUnit G
public static final WeightUnit KG
public static final WeightUnit T
Method Detail |
---|
public static WeightUnit[] values()
for (WeightUnit c : WeightUnit.values()) System.out.println(c);
public static WeightUnit valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic long getBaseUnitValue()
getBaseUnitValue
in interface UnitType
public List<UnitType> getAll()
UnitType
.
getAll
in interface UnitType
public UnitType getBaseUnit()
UnitType
.
getBaseUnit
in interface UnitType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |