public static enum Product.Unit extends java.lang.Enum<Product.Unit>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
unitName |
Modifier and Type | Method and Description |
---|---|
static Product.Unit |
create(java.lang.String unitName) |
java.lang.String |
getUnitName() |
static Product.Unit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Product.Unit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Product.Unit KG
public static final Product.Unit LITER
public static final Product.Unit UNIT
public static Product.Unit[] values()
for (Product.Unit c : Product.Unit.values()) System.out.println(c);
public static Product.Unit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static Product.Unit create(java.lang.String unitName)
public java.lang.String getUnitName()