Record Class ChatParseResult
java.lang.Object
java.lang.Record
com.zenith.feature.chatschema.ChatParseResult
public record ChatParseResult(ChatType type, @Nullable PlayerListEntry sender, @Nullable PlayerListEntry receiver, @Nullable String messageContent)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChatParseResult(ChatType type, @Nullable PlayerListEntry sender, @Nullable PlayerListEntry receiver, @Nullable String messageContent) Creates an instance of aChatParseResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of themessageContentrecord component.@Nullable PlayerListEntryreceiver()Returns the value of thereceiverrecord component.@Nullable PlayerListEntrysender()Returns the value of thesenderrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ChatParseResult
public ChatParseResult(ChatType type, @Nullable PlayerListEntry sender, @Nullable PlayerListEntry receiver, @Nullable String messageContent) Creates an instance of aChatParseResultrecord class.- Parameters:
type- the value for thetyperecord componentsender- the value for thesenderrecord componentreceiver- the value for thereceiverrecord componentmessageContent- the value for themessageContentrecord component
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
sender
Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
receiver
Returns the value of thereceiverrecord component.- Returns:
- the value of the
receiverrecord component
-
messageContent
Returns the value of themessageContentrecord component.- Returns:
- the value of the
messageContentrecord component
-