public interface PacketTypeMap<P>
Modifier and Type | Method and Description |
---|---|
static <S extends PacketType,T extends S> |
of(java.lang.Class<T> enumClass) |
static <T> PacketTypeMap<T> |
of(java.util.Map<java.lang.String,T> packetsByName,
it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> packetsById) |
static <T> PacketTypeMap<T> |
of(java.util.Map<java.lang.String,T> packetsByName,
T[] packets) |
P |
typeById(int packetTypeId)
Returns the packet type by the given id.
|
P |
typeByName(java.lang.String packetTypeName)
Returns the packet type by the given name.
|
java.util.Collection<P> |
types()
Returns a collection of all contained packet types.
|
P typeByName(java.lang.String packetTypeName)
packetTypeName
- packet type nameP typeById(int packetTypeId)
packetTypeId
- packet type idjava.util.Collection<P> types()
static <S extends PacketType,T extends S> PacketTypeMap<S> of(java.lang.Class<T> enumClass)
static <T> PacketTypeMap<T> of(java.util.Map<java.lang.String,T> packetsByName, it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> packetsById)
static <T> PacketTypeMap<T> of(java.util.Map<java.lang.String,T> packetsByName, T[] packets)