Record Class CCServerInfo

java.lang.Object
java.lang.Record
de.florianmichael.classic4j.model.classicube.server.CCServerInfo

public record CCServerInfo(String hash, int maxPlayers, String name, int players, String software, long uptime, String countryCode, boolean web, boolean featured, String ip, int port, String mpPass) extends Record
This class represents a server on the Classicube server list. It is used by CCServerList.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CCServerInfo(String hash, int maxPlayers, String name, int players, String software, long uptime, String countryCode, boolean web, boolean featured, String ip, int port, String mpPass)
    Creates an instance of a CCServerInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the countryCode record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the featured record component.
    Returns the value of the hash record component.
    final int
    Returns a hash code value for this object.
    ip()
    Returns the value of the ip record component.
    int
    Returns the value of the maxPlayers record component.
    Returns the value of the mpPass record component.
    Returns the value of the name record component.
    int
    Returns the value of the players record component.
    int
    Returns the value of the port record component.
    Returns the value of the software record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the uptime record component.
    boolean
    web()
    Returns the value of the web record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CCServerInfo

      public CCServerInfo(String hash, int maxPlayers, String name, int players, String software, long uptime, String countryCode, boolean web, boolean featured, String ip, int port, String mpPass)
      Creates an instance of a CCServerInfo record class.
      Parameters:
      hash - the value for the hash record component
      maxPlayers - the value for the maxPlayers record component
      name - the value for the name record component
      players - the value for the players record component
      software - the value for the software record component
      uptime - the value for the uptime record component
      countryCode - the value for the countryCode record component
      web - the value for the web record component
      featured - the value for the featured record component
      ip - the value for the ip record component
      port - the value for the port record component
      mpPass - the value for the mpPass 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 '=='.
      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.
    • hash

      @SerializedName("hash") public String hash()
      Returns the value of the hash record component.
      Returns:
      the value of the hash record component
    • maxPlayers

      @SerializedName("maxplayers") public int maxPlayers()
      Returns the value of the maxPlayers record component.
      Returns:
      the value of the maxPlayers record component
    • name

      @SerializedName("name") public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • players

      @SerializedName("players") public int players()
      Returns the value of the players record component.
      Returns:
      the value of the players record component
    • software

      @SerializedName("software") public String software()
      Returns the value of the software record component.
      Returns:
      the value of the software record component
    • uptime

      @SerializedName("uptime") public long uptime()
      Returns the value of the uptime record component.
      Returns:
      the value of the uptime record component
    • countryCode

      @SerializedName("country_abbr") public String countryCode()
      Returns the value of the countryCode record component.
      Returns:
      the value of the countryCode record component
    • web

      @SerializedName("web") public boolean web()
      Returns the value of the web record component.
      Returns:
      the value of the web record component
    • featured

      @SerializedName("featured") public boolean featured()
      Returns the value of the featured record component.
      Returns:
      the value of the featured record component
    • ip

      @SerializedName("ip") public String ip()
      Returns the value of the ip record component.
      Returns:
      the value of the ip record component
    • port

      @SerializedName("port") public int port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • mpPass

      @SerializedName("mppass") public String mpPass()
      Returns the value of the mpPass record component.
      Returns:
      the value of the mpPass record component