Package dev.pfaff.discordrpc.message
Record Class Handshake
java.lang.Object
java.lang.Record
dev.pfaff.discordrpc.message.Handshake
- All Implemented Interfaces:
Message
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.pfaff.discordrpc.message.Message
Message.Opcode, Message.Unknown -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclient_idrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nonce()Returns the value of thenoncerecord component.intopcode()final StringtoString()Returns a string representation of this record class.intv()Returns the value of thevrecord component.
-
Constructor Details
-
Handshake
Creates an instance of aHandshakerecord class.- Parameters:
client_id- the value for theclient_idrecord componentv- the value for thevrecord componentnonce- the value for thenoncerecord component
-
-
Method Details
-
opcode
public int opcode() -
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 '=='. -
client_id
Returns the value of theclient_idrecord component.- Returns:
- the value of the
client_idrecord component
-
v
public int v()Returns the value of thevrecord component.- Returns:
- the value of the
vrecord component
-
nonce
Returns the value of thenoncerecord component.- Returns:
- the value of the
noncerecord component
-