Package net.minecraftforge.client
Record Class ExtendedServerListData
java.lang.Object
java.lang.Record
net.minecraftforge.client.ExtendedServerListData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theextraReasonrecord component.private final booleanThe field for theisCompatiblerecord component.private final intThe field for thenumberOfModsrecord component.private final booleanThe field for thetruncatedrecord component.private final StringThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason) ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason, boolean truncated) Creates an instance of aExtendedServerListDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theextraReasonrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisCompatiblerecord component.intReturns the value of thenumberOfModsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetruncatedrecord component.type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
isCompatible
private final boolean isCompatibleThe field for theisCompatiblerecord component. -
numberOfMods
private final int numberOfModsThe field for thenumberOfModsrecord component. -
extraReason
The field for theextraReasonrecord component. -
truncated
private final boolean truncatedThe field for thetruncatedrecord component.
-
-
Constructor Details
-
ExtendedServerListData
-
ExtendedServerListData
public ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason, boolean truncated) Creates an instance of aExtendedServerListDatarecord class.- Parameters:
type- the value for thetyperecord componentisCompatible- the value for theisCompatiblerecord componentnumberOfMods- the value for thenumberOfModsrecord componentextraReason- the value for theextraReasonrecord componenttruncated- the value for thetruncatedrecord 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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
isCompatible
public boolean isCompatible()Returns the value of theisCompatiblerecord component.- Returns:
- the value of the
isCompatiblerecord component
-
numberOfMods
public int numberOfMods()Returns the value of thenumberOfModsrecord component.- Returns:
- the value of the
numberOfModsrecord component
-
extraReason
Returns the value of theextraReasonrecord component.- Returns:
- the value of the
extraReasonrecord component
-
truncated
public boolean truncated()Returns the value of thetruncatedrecord component.- Returns:
- the value of the
truncatedrecord component
-