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 SummaryFieldsModifier and TypeFieldDescriptionprivate final PacketFlowThe field for thedirectionrecord component.private static final Map<NetworkPacketSummary.PacketIdentification,String> private final intThe field for thepacketIdrecord component.private final StringThe field for theprotocolIdrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPacketIdentification(PacketFlow direction, String protocolId, int packetId) Creates an instance of aPacketIdentificationrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.from(RecordedEvent p_185778_) final inthashCode()Returns a hash code value for this object.intpacketId()Returns the value of thepacketIdrecord component.Returns the value of theprotocolIdrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
directionThe field for thedirectionrecord component.
- 
protocolIdThe field for theprotocolIdrecord component.
- 
packetIdprivate final int packetIdThe field for thepacketIdrecord component.
- 
PACKET_NAME_BY_ID
 
- 
- 
Constructor Details- 
PacketIdentificationCreates an instance of aPacketIdentificationrecord class.- Parameters:
- direction- the value for the- directionrecord component
- protocolId- the value for the- protocolIdrecord component
- packetId- the value for the- packetIdrecord component
 
 
- 
- 
Method Details- 
packetName
- 
from
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
directionReturns the value of thedirectionrecord component.- Returns:
- the value of the directionrecord component
 
- 
protocolIdReturns the value of theprotocolIdrecord component.- Returns:
- the value of the protocolIdrecord component
 
- 
packetIdpublic int packetId()Returns the value of thepacketIdrecord component.- Returns:
- the value of the packetIdrecord component
 
 
-