Package net.minecraft.client.gui.chat
Record Class ChatPreviewRequests.PendingPreview
java.lang.Object
java.lang.Record
net.minecraft.client.gui.chat.ChatPreviewRequests.PendingPreview
- Enclosing class:
- ChatPreviewRequests
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPendingPreview
(int id, String query) Creates an instance of aPendingPreview
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.boolean
matches
(int p_232391_) boolean
query()
Returns the value of thequery
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
id
private final int idThe field for theid
record component. -
query
The field for thequery
record component.
-
-
Constructor Details
-
PendingPreview
PendingPreview(int id, String query) Creates an instance of aPendingPreview
record class.- Parameters:
id
- the value for theid
record componentquery
- the value for thequery
record component
-
-
Method Details
-
matches
public boolean matches(int p_232391_) -
matches
-
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 '=='. -
id
public int id()Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
query
Returns the value of thequery
record component.- Returns:
- the value of the
query
record component
-