Interface PacketTypeMap<P extends PacketType>
public interface PacketTypeMap<P extends PacketType>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends PacketType,
E extends T>
PacketTypeMap<T>static <T extends PacketType>
PacketTypeMap<T>static <T extends PacketType>
PacketTypeMap<T>@Nullable P
typeById
(int packetTypeId) Returns the packet type by the given id.@Nullable P
typeByName
(String packetTypeName) Returns the packet type by the given name.types()
Returns a collection of all contained packet types.
-
Method Details
-
typeByName
Returns the packet type by the given name.- Parameters:
packetTypeName
- packet type name- Returns:
- packet type if present
-
typeById
Returns the packet type by the given id.- Parameters:
packetTypeId
- packet type id- Returns:
- packet type if present
-
types
Collection<P> types()Returns a collection of all contained packet types.- Returns:
- collection of all packet types
-
of
-
of
static <T extends PacketType> PacketTypeMap<T> of(Map<String, T> packetsByName, it.unimi.dsi.fastutil.ints.Int2ObjectMap<T> packetsById) -
of
-