Record Class NetworkPacketSummary.PacketIdentification
java.lang.Object
java.lang.Record
net.minecraft.util.profiling.jfr.stats.NetworkPacketSummary.PacketIdentification
- Enclosing class:
NetworkPacketSummary
public static record NetworkPacketSummary.PacketIdentification(PacketFlow direction, String protocolId, int packetId)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PacketFlow
The field for thedirection
record component.private static final Map<NetworkPacketSummary.PacketIdentification,
String> private final int
The field for thepacketId
record component.private final String
The field for theprotocolId
record component. -
Constructor Summary
ConstructorDescriptionPacketIdentification
(PacketFlow direction, String protocolId, int packetId) Creates an instance of aPacketIdentification
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirection
record component.final boolean
Indicates whether some other object is "equal to" this one.from
(RecordedEvent p_185778_) final int
hashCode()
Returns a hash code value for this object.int
packetId()
Returns the value of thepacketId
record component.Returns the value of theprotocolId
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
direction
The field for thedirection
record component. -
protocolId
The field for theprotocolId
record component. -
packetId
private final int packetIdThe field for thepacketId
record component. -
PACKET_NAME_BY_ID
-
-
Constructor Details
-
PacketIdentification
Creates an instance of aPacketIdentification
record class.- Parameters:
direction
- the value for thedirection
record componentprotocolId
- the value for theprotocolId
record componentpacketId
- the value for thepacketId
record component
-
-
Method Details
-
packetName
-
from
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
direction
Returns the value of thedirection
record component.- Returns:
- the value of the
direction
record component
-
protocolId
Returns the value of theprotocolId
record component.- Returns:
- the value of the
protocolId
record component
-
packetId
public int packetId()Returns the value of thepacketId
record component.- Returns:
- the value of the
packetId
record component
-