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