public enum BatteryState extends Enum<BatteryState>
| Enum Constant and Description |
|---|
charging |
fullCharged |
low |
normal |
unknown |
veryLow |
| Modifier and Type | Method and Description |
|---|---|
static BatteryState |
fromValue(int code) |
int |
getCode() |
String |
toString() |
static BatteryState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BatteryState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BatteryState unknown
public static final BatteryState charging
public static final BatteryState veryLow
public static final BatteryState low
public static final BatteryState normal
public static final BatteryState fullCharged
public static BatteryState[] values()
for (BatteryState c : BatteryState.values()) System.out.println(c);
public static BatteryState 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 int getCode()
public String toString()
toString in class Enum<BatteryState>public static BatteryState fromValue(int code)