public enum MsgType extends Enum<MsgType>
Enum Constant and Description |
---|
MSG_TYPE_IMG
图片
|
MSG_TYPE_MUSIC
音乐
|
MSG_TYPE_NEWS
图文
|
MSG_TYPE_TEXT
文本
|
MSG_TYPE_VIDEO
视频
|
MSG_TYPE_VOICE
语音
|
Modifier and Type | Method and Description |
---|---|
static MsgType |
forNumber(int value) |
int |
getNumber() |
static MsgType |
valueOf(int value) |
static MsgType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MsgType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MsgType MSG_TYPE_TEXT
文本
MSG_TYPE_TEXT = 0;
public static final MsgType MSG_TYPE_IMG
图片
MSG_TYPE_IMG = 1;
public static final MsgType MSG_TYPE_VOICE
语音
MSG_TYPE_VOICE = 2;
public static final MsgType MSG_TYPE_VIDEO
视频
MSG_TYPE_VIDEO = 3;
public static final MsgType MSG_TYPE_MUSIC
音乐
MSG_TYPE_MUSIC = 4;
public static final MsgType MSG_TYPE_NEWS
图文
MSG_TYPE_NEWS = 5;
public static MsgType[] values()
for (MsgType c : MsgType.values()) System.out.println(c);
public static MsgType 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 MsgType valueOf(int value)
public static MsgType forNumber(int value)
Copyright © 2018. All rights reserved.