Serializable, Comparable<DeviceConnectState>public enum DeviceConnectState extends Enum<DeviceConnectState>
| 枚举常量 | 说明 |
|---|---|
CONNECTED |
Indicates that the device is connected.
|
CONNECTING |
Indicates that the device is being connected.
|
DIS_CONNECTING |
Indicates that the device is being disconnected.
|
FAILURE |
Indicates that the device fails to be connected.
|
IDLE |
Indicates that the device is in the initial state or is disconnected.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static DeviceConnectState |
getConnectState(int state) |
Obtains a
DeviceConnectState enum constant based on a specified int value. |
int |
getState() |
Obtains the int value representing the device connection state enumerated in
DeviceConnectState. |
static DeviceConnectState |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static DeviceConnectState[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (DeviceConnectState c : DeviceConnectState.values()) System.out.println(c); |
public static final DeviceConnectState FAILURE
public static final DeviceConnectState IDLE
public static final DeviceConnectState CONNECTING
public static final DeviceConnectState CONNECTED
public static final DeviceConnectState DIS_CONNECTING
public static DeviceConnectState[] values()
for (DeviceConnectState c : DeviceConnectState.values()) System.out.println(c);
public static DeviceConnectState valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getState()
DeviceConnectState.public static DeviceConnectState getConnectState(int state)
DeviceConnectState enum constant based on a specified int value.state - Indicates the specified int value that represents the device connection state.