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)

public record ClientIdentifier(long clientIndex, int clientId) extends Record
Encapsulates data representing a unique client in a WebX Engine
  • Constructor Details

    • ClientIdentifier

      public ClientIdentifier(long clientIndex, int clientId)
      Creates an instance of a ClientIdentifier record class.
      Parameters:
      clientIndex - the value for the clientIndex record component
      clientId - the value for the clientId record component
  • Method Details

    • clientIdString

      public String clientIdString()
      Returns a hex representation of the client Id
      Returns:
      a hex representation of the client Id
    • clientIndexString

      public String clientIndexString()
      Returns the hex representation of the client Index
      Returns:
      the hex representation of the client Index
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • clientIndex

      public long clientIndex()
      Returns the value of the clientIndex record component.
      Returns:
      the value of the clientIndex record component
    • clientId

      public int clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component