public enum FuelEconomyUnit extends Enum<FuelEconomyUnit> implements HasName
| Enum Constant and Description |
|---|
GALLON_PER_100_KM |
KM_PER_GALLON |
KM_PER_LITER
The km per liter unit.
|
LITERS_PER_100_KM
The liters per 100 km unit.
|
MPG_IMPERIAL
The miles per gallon (Imperial).
|
MPGUS
The miles per gallon (US).
|
UNKNOWN
Fallback when enumeration value is unknown.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
static FuelEconomyUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FuelEconomyUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FuelEconomyUnit UNKNOWN
public static final FuelEconomyUnit LITERS_PER_100_KM
public static final FuelEconomyUnit KM_PER_LITER
public static final FuelEconomyUnit MPGUS
public static final FuelEconomyUnit MPG_IMPERIAL
public static final FuelEconomyUnit GALLON_PER_100_KM
public static final FuelEconomyUnit KM_PER_GALLON
public static FuelEconomyUnit[] values()
for (FuelEconomyUnit c : FuelEconomyUnit.values()) System.out.println(c);
public static FuelEconomyUnit 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 nullCopyright © 2023. All rights reserved.