Record Class FlickProtocol.ClientHello

java.lang.Object
java.lang.Record
net.flick.serverapi.protocol.FlickProtocol.ClientHello
Enclosing class:
FlickProtocol

public static record FlickProtocol.ClientHello(int proto, String version, String mc, Set<String> modules, Set<String> caps, Map<String,Boolean> allow) extends Record
Parsed and validated hello.
  • Constructor Details

    • ClientHello

      public ClientHello(int proto, String version, String mc, Set<String> modules, Set<String> caps, Map<String,Boolean> allow)
      Creates an instance of a ClientHello record class.
      Parameters:
      proto - the value for the proto record component
      version - the value for the version record component
      mc - the value for the mc record component
      modules - the value for the modules record component
      caps - the value for the caps record component
      allow - the value for the allow record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • proto

      public int proto()
      Returns the value of the proto record component.
      Returns:
      the value of the proto record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • mc

      public String mc()
      Returns the value of the mc record component.
      Returns:
      the value of the mc record component
    • modules

      public Set<String> modules()
      Returns the value of the modules record component.
      Returns:
      the value of the modules record component
    • caps

      public Set<String> caps()
      Returns the value of the caps record component.
      Returns:
      the value of the caps record component
    • allow

      public Map<String,Boolean> allow()
      Returns the value of the allow record component.
      Returns:
      the value of the allow record component