Enum Class WeightUnit
- All Implemented Interfaces:
Serializable,Comparable<WeightUnit>,Constable,ComboAlias,Unit
An enumeration to store units of weight.
- Since:
- 5.2
- Version:
- 7.0
- Author:
- Luke
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.doubleReturns the ratio of this distance unit to pounds.Returns the unit name.static WeightUnitReturns the enum constant of this class with the specified name.static WeightUnit[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LB
-
KG
-
-
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
-
getUnitName
Returns the unit name.- Specified by:
getUnitNamein interfaceUnit- Returns:
- the full name
-
getFactor
-
getComboName
Description copied from interface:ComboAliasReturns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboNamein interfaceComboAlias- Returns:
- The visible name for this entry
-
getComboAlias
Description copied from interface:ComboAliasReturns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAliasin interfaceComboAlias- Returns:
- The alias for this entry
-