public enum EnergyUnit extends Enum<EnergyUnit>
Enum Constant and Description |
---|
BTU |
CALORIE |
DEFAULT |
ELECTRONVOLT |
ERG |
FT_LB |
JOULE |
KG_METRE |
KILOJOULE |
KILOWATT_HOUR |
KILOWATT_SECOND |
THERM |
WATT_HOUR |
WATT_SECOND |
Modifier and Type | Field and Description |
---|---|
int |
value |
Modifier and Type | Method and Description |
---|---|
static EnergyUnit |
fromValue(int value) |
static EnergyUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EnergyUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnergyUnit DEFAULT
public static final EnergyUnit JOULE
public static final EnergyUnit KILOJOULE
public static final EnergyUnit ELECTRONVOLT
public static final EnergyUnit ERG
public static final EnergyUnit FT_LB
public static final EnergyUnit CALORIE
public static final EnergyUnit KG_METRE
public static final EnergyUnit BTU
public static final EnergyUnit WATT_SECOND
public static final EnergyUnit WATT_HOUR
public static final EnergyUnit KILOWATT_SECOND
public static final EnergyUnit KILOWATT_HOUR
public static final EnergyUnit THERM
public static EnergyUnit[] values()
for (EnergyUnit c : EnergyUnit.values()) System.out.println(c);
public static EnergyUnit 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 EnergyUnit fromValue(int value)
Copyright © 2022. All rights reserved.