public enum MessageType extends Enum<MessageType> implements EnumConverter<Byte>
Enum Constant and Description |
---|
QUERY
A query message.
|
RESPONSE
A response message.
|
Modifier and Type | Method and Description |
---|---|
Byte |
convert()
Convert the enum to another type.
|
static MessageType |
convert(byte value)
Converts an ordinal value into a
MessageType . |
static MessageType |
valueOf(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.
|
public static final MessageType QUERY
public static final MessageType RESPONSE
public static MessageType[] values()
for (MessageType c : MessageType.values()) System.out.println(c);
public static MessageType 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 Byte convert()
EnumConverter
convert
in interface EnumConverter<Byte>
public static MessageType convert(byte value)
MessageType
.value
- MessageType
.Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.