Package eu.ill.webx.model
Record Class ClientIdentifier
java.lang.Object
java.lang.Record
eu.ill.webx.model.ClientIdentifier
- Record Components:
clientIndex- The unique index of a client (used to filter messages)clientId- The unique Id of a client (used to identify instructions to the WebX Engine)
Encapsulates data representing a unique client in a WebX Engine
-
Constructor Summary
ConstructorsConstructorDescriptionClientIdentifier(long clientIndex, int clientId) Creates an instance of aClientIdentifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintclientId()Returns the value of theclientIdrecord component.Returns a hex representation of the client IdlongReturns the value of theclientIndexrecord component.Returns the hex representation of the client Indexfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClientIdentifier
public ClientIdentifier(long clientIndex, int clientId) Creates an instance of aClientIdentifierrecord class.- Parameters:
clientIndex- the value for theclientIndexrecord componentclientId- the value for theclientIdrecord component
-
-
Method Details
-
clientIdString
Returns a hex representation of the client Id- Returns:
- a hex representation of the client Id
-
clientIndexString
Returns the hex representation of the client Index- Returns:
- the hex representation of the client Index
-
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. All components in this record class are compared with '=='. -
clientIndex
public long clientIndex()Returns the value of theclientIndexrecord component.- Returns:
- the value of the
clientIndexrecord component
-
clientId
public int clientId()Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-