java.lang.Object
java.lang.Record
nl.andrewl.concord_core.msg.types.chat.ChatHistoryResponse
- Record Components:
channelId
- The id of the channel that the chat messages belong to.messages
- The list of messages that comprises the history.
- All Implemented Interfaces:
Message
public record ChatHistoryResponse(UUID channelId, Chat[] messages)
extends Record
implements Message
The response that a server sends to a
ChatHistoryRequest
. The list of
messages is ordered by timestamp, with the newest messages appearing first.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChatHistoryResponse
(UUID channelId, Chat[] messages) Creates an instance of aChatHistoryResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechannelId
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Chat[]
messages()
Returns the value of themessages
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.andrewl.concord_core.msg.Message
byteSize, getTypeSerializer
-
Field Details
-
Constructor Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
channelId
Returns the value of thechannelId
record component.- Returns:
- the value of the
channelId
record component
-
messages
Returns the value of themessages
record component.- Returns:
- the value of the
messages
record component
-