Record Class PromptResult.Messages
java.lang.Object
java.lang.Record
dev.tachyonmcp.api.server.features.prompts.PromptResult.Messages
- Record Components:
messages- the prompt messages, ornullfor an empty response
- All Implemented Interfaces:
HasMeta,PromptResult
- Enclosing interface:
PromptResult
public static record PromptResult.Messages(@Nullable List<PromptMessage> messages)
extends Record
implements PromptResult
A prompt result containing one or more prompt messages.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.tachyonmcp.api.server.features.prompts.PromptResult
PromptResult.InputRequired, PromptResult.Messages, PromptResult.WithMeta -
Constructor Summary
ConstructorsConstructorDescriptionMessages(@Nullable List<PromptMessage> messages) Creates an instance of aMessagesrecord 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 List<PromptMessage> messages()Returns the value of themessagesrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.tachyonmcp.api.server.features.prompts.PromptResult
meta, withMeta, withMeta
-
Constructor Details
-
Messages
Creates an instance of aMessagesrecord class.- Parameters:
messages- the value for themessagesrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-