public enum DeviceType extends Enum<DeviceType>
设备类型enum
DeviceType| Enum Constant and Description |
|---|
DEVICE_TYPE_ANDROID
安卓
|
DEVICE_TYPE_IOS
IOS
|
DEVICE_TYPE_PC
PC
|
DEVICE_TYPE_UNKNOW
DEVICE_TYPE_UNKNOW = 0; |
| Modifier and Type | Method and Description |
|---|---|
static DeviceType |
forNumber(int value) |
int |
getNumber() |
static DeviceType |
valueOf(int value) |
static DeviceType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DeviceType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DeviceType DEVICE_TYPE_UNKNOW
DEVICE_TYPE_UNKNOW = 0;public static final DeviceType DEVICE_TYPE_PC
PC
DEVICE_TYPE_PC = 1;public static final DeviceType DEVICE_TYPE_ANDROID
安卓
DEVICE_TYPE_ANDROID = 2;public static final DeviceType DEVICE_TYPE_IOS
IOS
DEVICE_TYPE_IOS = 3;public static DeviceType[] values()
for (DeviceType c : DeviceType.values()) System.out.println(c);
public static DeviceType 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 final int getNumber()
public static DeviceType valueOf(int value)
public static DeviceType forNumber(int value)
Copyright © 2018. All rights reserved.