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 -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecountryCoderecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfeatured()Returns the value of thefeaturedrecord component.hash()Returns the value of thehashrecord component.final inthashCode()Returns a hash code value for this object.ip()Returns the value of theiprecord component.intReturns the value of themaxPlayersrecord component.mpPass()Returns the value of thempPassrecord component.name()Returns the value of thenamerecord component.intplayers()Returns the value of theplayersrecord component.intport()Returns the value of theportrecord component.software()Returns the value of thesoftwarerecord component.final StringtoString()Returns a string representation of this record class.longuptime()Returns the value of theuptimerecord component.booleanweb()Returns the value of thewebrecord component.
-
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 aCCServerInforecord class.- Parameters:
hash- the value for thehashrecord componentmaxPlayers- the value for themaxPlayersrecord componentname- the value for thenamerecord componentplayers- the value for theplayersrecord componentsoftware- the value for thesoftwarerecord componentuptime- the value for theuptimerecord componentcountryCode- the value for thecountryCoderecord componentweb- the value for thewebrecord componentfeatured- the value for thefeaturedrecord componentip- the value for theiprecord componentport- the value for theportrecord componentmpPass- the value for thempPassrecord component
-
-
Method Details
-
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 '=='. -
hash
Returns the value of thehashrecord component.- Returns:
- the value of the
hashrecord component
-
maxPlayers
@SerializedName("maxplayers") public int maxPlayers()Returns the value of themaxPlayersrecord component.- Returns:
- the value of the
maxPlayersrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
players
@SerializedName("players") public int players()Returns the value of theplayersrecord component.- Returns:
- the value of the
playersrecord component
-
software
Returns the value of thesoftwarerecord component.- Returns:
- the value of the
softwarerecord component
-
uptime
@SerializedName("uptime") public long uptime()Returns the value of theuptimerecord component.- Returns:
- the value of the
uptimerecord component
-
countryCode
Returns the value of thecountryCoderecord component.- Returns:
- the value of the
countryCoderecord component
-
web
@SerializedName("web") public boolean web()Returns the value of thewebrecord component.- Returns:
- the value of the
webrecord component
-
featured
@SerializedName("featured") public boolean featured()Returns the value of thefeaturedrecord component.- Returns:
- the value of the
featuredrecord component
-
ip
Returns the value of theiprecord component.- Returns:
- the value of the
iprecord component
-
port
@SerializedName("port") public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
mpPass
Returns the value of thempPassrecord component.- Returns:
- the value of the
mpPassrecord component
-