public enum ConnectState extends Enum<ConnectState> implements IEnumType
| Enum Constant and Description |
|---|
Connected |
Connecting |
Disconnected |
Disconnecting |
Listen |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Get the enum code value
|
String |
toString()
Return the name of the enum
|
static ConnectState |
valueOf(int code)
Returns the enum constant of this type with the specified code.
|
static ConnectState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConnectState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectState Disconnected
public static final ConnectState Listen
public static final ConnectState Connecting
public static final ConnectState Connected
public static final ConnectState Disconnecting
public static ConnectState[] values()
for (ConnectState c : ConnectState.values()) System.out.println(c);
public static ConnectState 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()
IEnumTypepublic String toString()
IEnumTypetoString in interface IEnumTypetoString in class Enum<ConnectState>public static ConnectState valueOf(int code)
code - The code to check