Enum Class MeasuringUnit
- All Implemented Interfaces:
Serializable,Comparable<MeasuringUnit>,Constable
The enum class defines a set of valid units of measurements related to the ingredients and
recipes. The label property of each constant provides a lower-case representation of each unit
that can be used in presentation to the user.
- Since:
- 13.03.2023
- Author:
- hannesofie
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic MeasuringUnitReturns the enum constant of this class with the specified name.static MeasuringUnit[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DL
Deciliter. -
L
Liter. -
TSP
Teaspoon. -
TBS
Tablespoon. -
GR
Gram. -
KG
Kilogram. -
PC
Pieces. -
CAN
Can. -
SLICE
Slice. -
PKG
Pack. -
CB
Cubes.
-
-
Field Details
-
label
Label of the categories. The label formats the string value of the categories two string in lower caps.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-