public enum PacketFormat extends java.lang.Enum<PacketFormat>
Enum Constant and Description |
---|
CURRENT
Always use the current (new) packet format.
|
LEGACY
Always use the old (legacy) packet format.
|
ROUNDTRIP
Let the individual packet decide the format (see
Packet.hasNewPacketFormat() ). |
Modifier and Type | Method and Description |
---|---|
static PacketFormat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PacketFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PacketFormat LEGACY
public static final PacketFormat CURRENT
public static final PacketFormat ROUNDTRIP
Packet.hasNewPacketFormat()
).
This allows to round-trip packets without changing the packet format.public static PacketFormat[] values()
for (PacketFormat c : PacketFormat.values()) System.out.println(c);
public static PacketFormat 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 null