Package com.jtelegram.api.message
Enum MessageType
- java.lang.Object
-
- java.lang.Enum<MessageType>
-
- com.jtelegram.api.message.MessageType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MessageType>
public enum MessageType extends java.lang.Enum<MessageType>
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends Message>
getMessageClass()
java.lang.Class<? extends MessageEvent>
getReceiveEventClass()
static MessageType
typeFrom(java.lang.Class<? extends Message> clazz)
static <T extends Message>
MessageTypetypeFrom(T message)
static MessageType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MessageType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TEXT
public static final MessageType TEXT
-
ANIMATION
public static final MessageType ANIMATION
-
AUDIO
public static final MessageType AUDIO
-
DOCUMENT
public static final MessageType DOCUMENT
-
GAME
public static final MessageType GAME
-
PHOTO
public static final MessageType PHOTO
-
STICKER
public static final MessageType STICKER
-
VIDEO
public static final MessageType VIDEO
-
VOICE
public static final MessageType VOICE
-
VIDEO_NOTE
public static final MessageType VIDEO_NOTE
-
CONTACT
public static final MessageType CONTACT
-
VENUE
public static final MessageType VENUE
-
LOCATION
public static final MessageType LOCATION
-
INVOICE
public static final MessageType INVOICE
-
SUCCESSFUL_PAYMENT
public static final MessageType SUCCESSFUL_PAYMENT
-
NEW_CHAT_MEMBERS
public static final MessageType NEW_CHAT_MEMBERS
-
LEFT_CHAT_MEMBER
public static final MessageType LEFT_CHAT_MEMBER
-
NEW_CHAT_TITLE
public static final MessageType NEW_CHAT_TITLE
-
NEW_CHAT_PHOTO
public static final MessageType NEW_CHAT_PHOTO
-
DELETE_CHAT_PHOTO
public static final MessageType DELETE_CHAT_PHOTO
-
GROUP_CHAT_CREATED
public static final MessageType GROUP_CHAT_CREATED
-
PINNED_MESSAGE
public static final MessageType PINNED_MESSAGE
-
CONNECTED_WEBSITE
public static final MessageType CONNECTED_WEBSITE
-
SUPERGROUP_CHAT_CREATED
public static final MessageType SUPERGROUP_CHAT_CREATED
-
MIGRATE_TO_CHAT_ID
public static final MessageType MIGRATE_TO_CHAT_ID
-
MIGRATE_FROM_CHAT_ID
public static final MessageType MIGRATE_FROM_CHAT_ID
-
-
Method Detail
-
values
public static MessageType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MessageType c : MessageType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MessageType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
typeFrom
public static MessageType typeFrom(java.lang.Class<? extends Message> clazz)
-
typeFrom
public static <T extends Message> MessageType typeFrom(T message)
-
getMessageClass
public java.lang.Class<? extends Message> getMessageClass()
-
getReceiveEventClass
public java.lang.Class<? extends MessageEvent> getReceiveEventClass()
-
-