Record Class ExtendedServerListData

java.lang.Object
java.lang.Record
net.minecraftforge.client.ExtendedServerListData

public record ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason, boolean truncated) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    The field for the extraReason record component.
    private final boolean
    The field for the isCompatible record component.
    private final int
    The field for the numberOfMods record component.
    private final boolean
    The field for the truncated record component.
    private final String
    The field for the type record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason)
     
    ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason, boolean truncated)
    Creates an instance of a ExtendedServerListData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the extraReason record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isCompatible record component.
    int
    Returns the value of the numberOfMods record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the truncated record component.
    Returns the value of the type record component.

    Methods inherited from class java.lang.Object

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

    • type

      private final String type
      The field for the type record component.
    • isCompatible

      private final boolean isCompatible
      The field for the isCompatible record component.
    • numberOfMods

      private final int numberOfMods
      The field for the numberOfMods record component.
    • extraReason

      private final String extraReason
      The field for the extraReason record component.
    • truncated

      private final boolean truncated
      The field for the truncated record component.
  • Constructor Details

    • ExtendedServerListData

      public ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason)
    • ExtendedServerListData

      public ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason, boolean truncated)
      Creates an instance of a ExtendedServerListData record class.
      Parameters:
      type - the value for the type record component
      isCompatible - the value for the isCompatible record component
      numberOfMods - the value for the numberOfMods record component
      extraReason - the value for the extraReason record component
      truncated - the value for the truncated 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.
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • isCompatible

      public boolean isCompatible()
      Returns the value of the isCompatible record component.
      Returns:
      the value of the isCompatible record component
    • numberOfMods

      public int numberOfMods()
      Returns the value of the numberOfMods record component.
      Returns:
      the value of the numberOfMods record component
    • extraReason

      public String extraReason()
      Returns the value of the extraReason record component.
      Returns:
      the value of the extraReason record component
    • truncated

      public boolean truncated()
      Returns the value of the truncated record component.
      Returns:
      the value of the truncated record component