Record Class MCStatusResponse
java.lang.Object
java.lang.Record
com.zenith.feature.api.mcstatus.model.MCStatusResponse
public record MCStatusResponse(boolean online, String host, int port, @Nullable MCStatusMotdData motd, @Nullable String ip_address)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMCStatusResponse(boolean online, String host, int port, @Nullable MCStatusMotdData motd, @Nullable String ip_address) Creates an instance of aMCStatusResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.host()Returns the value of thehostrecord component.@Nullable StringReturns the value of theip_addressrecord component.@Nullable MCStatusMotdDatamotd()Returns the value of themotdrecord component.booleanonline()Returns the value of theonlinerecord component.intport()Returns the value of theportrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MCStatusResponse
public MCStatusResponse(boolean online, String host, int port, @Nullable MCStatusMotdData motd, @Nullable String ip_address) Creates an instance of aMCStatusResponserecord class.- Parameters:
online- the value for theonlinerecord componenthost- the value for thehostrecord componentport- the value for theportrecord componentmotd- the value for themotdrecord componentip_address- the value for theip_addressrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
online
public boolean online()Returns the value of theonlinerecord component.- Returns:
- the value of the
onlinerecord component
-
host
Returns the value of thehostrecord component.- Returns:
- the value of the
hostrecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
motd
Returns the value of themotdrecord component.- Returns:
- the value of the
motdrecord component
-
ip_address
Returns the value of theip_addressrecord component.- Returns:
- the value of the
ip_addressrecord component
-