Record Class RegionPingResult

java.lang.Object
java.lang.Record
net.minecraft.client.realms.dto.RegionPingResult
Record Components:
regionName -
ping -
All Implemented Interfaces:
RealmsSerializable

@Environment(CLIENT) public record RegionPingResult(String regionName, int ping) extends Record implements RealmsSerializable
Mappings:
Namespace Name
named net/minecraft/client/realms/dto/RegionPingResult
intermediary net/minecraft/class_4886
official fze
named regionName
intermediary comp_5028
official a
named ping
intermediary comp_5029
official b
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The field for the ping record component.
    private final String
    The field for the regionName record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RegionPingResult(String regionName, int ping)
    Creates an instance of a RegionPingResult record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    equals(Object object)
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the ping record component.
    Returns the value of the regionName record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • RegionPingResult

      public RegionPingResult(String regionName, int ping)
      Creates an instance of a RegionPingResult record class.
      Parameters:
      regionName - the value for the regionName record component
      ping - the value for the ping record component
  • Method Details

    • toString

      public 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • regionName

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

      @SerializedName("ping") public int ping()
      Returns the value of the ping record component.
      Returns:
      the value of the ping record component