Package net.minecraftforge.client
Record Class ExtendedServerListData
java.lang.Object
java.lang.Record
net.minecraftforge.client.ExtendedServerListData
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for theextraReason
record component.private final boolean
The field for theisCompatible
record component.private final int
The field for thenumberOfMods
record component.private final boolean
The field for thetruncated
record component.private final String
The field for thetype
record component. -
Constructor Summary
ConstructorDescriptionExtendedServerListData
(String type, boolean isCompatible, int numberOfMods, String extraReason) ExtendedServerListData
(String type, boolean isCompatible, int numberOfMods, String extraReason, boolean truncated) Creates an instance of aExtendedServerListData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theextraReason
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisCompatible
record component.int
Returns the value of thenumberOfMods
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of thetruncated
record component.type()
Returns the value of thetype
record component.
-
Field Details
-
type
The field for thetype
record component. -
isCompatible
private final boolean isCompatibleThe field for theisCompatible
record component. -
numberOfMods
private final int numberOfModsThe field for thenumberOfMods
record component. -
extraReason
The field for theextraReason
record component. -
truncated
private final boolean truncatedThe field for thetruncated
record component.
-
-
Constructor Details
-
ExtendedServerListData
-
ExtendedServerListData
public ExtendedServerListData(String type, boolean isCompatible, int numberOfMods, String extraReason, boolean truncated) Creates an instance of aExtendedServerListData
record class.- Parameters:
type
- the value for thetype
record componentisCompatible
- the value for theisCompatible
record componentnumberOfMods
- the value for thenumberOfMods
record componentextraReason
- the value for theextraReason
record componenttruncated
- the value for thetruncated
record 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 thetype
record component.- Returns:
- the value of the
type
record component
-
isCompatible
public boolean isCompatible()Returns the value of theisCompatible
record component.- Returns:
- the value of the
isCompatible
record component
-
numberOfMods
public int numberOfMods()Returns the value of thenumberOfMods
record component.- Returns:
- the value of the
numberOfMods
record component
-
extraReason
Returns the value of theextraReason
record component.- Returns:
- the value of the
extraReason
record component
-
truncated
public boolean truncated()Returns the value of thetruncated
record component.- Returns:
- the value of the
truncated
record component
-