public enum ConnectType extends java.lang.Enum<ConnectType> implements IEnumType
Enum Constant and Description |
---|
Bluetooth |
BluetoothLe |
UART |
Unknown |
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Get the enum code value
|
static java.lang.String[] |
names() |
java.lang.String |
toString()
Return the name of the enum
|
static ConnectType |
valueOf(int code)
Returns the enum constant of this type with the specified code.
|
static ConnectType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConnectType |
valueOfName(java.lang.String name) |
static ConnectType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectType Unknown
public static final ConnectType Bluetooth
public static final ConnectType BluetoothLe
public static final ConnectType UART
public static ConnectType[] values()
for (ConnectType c : ConnectType.values()) System.out.println(c);
public static ConnectType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getCode()
IEnumType
public java.lang.String toString()
IEnumType
toString
in interface IEnumType
toString
in class java.lang.Enum<ConnectType>
public static ConnectType valueOf(int code)
code
- The code to checkpublic static ConnectType valueOfName(java.lang.String name)
public static java.lang.String[] names()