Record Class ChatLog.Entry<T extends LoggedChatEvent>
java.lang.Object
java.lang.Record
net.minecraft.client.multiplayer.chat.ChatLog.Entry<T>
- Enclosing interface:
- ChatLog
public static record ChatLog.Entry<T extends LoggedChatEvent>(int id, T extends LoggedChatEvent event)
extends Record
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.event()
Returns the value of theevent
record component.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.final String
toString()
Returns a string representation of this record class.<U extends LoggedChatEvent>
ChatLog.Entry<U>
-
Field Details
-
id
private final int idThe field for theid
record component. -
event
The field for theevent
record component.
-
-
Constructor Details
-
Entry
Creates an instance of aEntry
record class.- Parameters:
id
- the value for theid
record componentevent
- the value for theevent
record component
-
-
Method Details
-
tryCast
-
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
-
event
Returns the value of theevent
record component.- Returns:
- the value of the
event
record component
-