Record Class NeonSocket.ReceivedNeonPacket
java.lang.Object
java.lang.Record
com.quietterminal.neon.core.NeonSocket.ReceivedNeonPacket
- Enclosing class:
NeonSocket
public static record NeonSocket.ReceivedNeonPacket(NeonPacket packet, SocketAddress source)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionReceivedNeonPacket(NeonPacket packet, SocketAddress source) Creates an instance of aReceivedNeonPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.packet()Returns the value of thepacketrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReceivedNeonPacket
Creates an instance of aReceivedNeonPacketrecord class.- Parameters:
packet- the value for thepacketrecord componentsource- the value for thesourcerecord component
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
packet
Returns the value of thepacketrecord component.- Returns:
- the value of the
packetrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-