Record Class EpisodicMemory.Episode
java.lang.Object
java.lang.Record
com.tnsai.coordination.production.EpisodicMemory.Episode
- Record Components:
taskId- the task identifieragentId- the agent that performed the tasktaskType- the type/category of the taskoutcome- the outcome (e.g., "success", "failure")metadata- additional contexttimestamp- when the episode occurred
- Enclosing class:
EpisodicMemory
public static record EpisodicMemory.Episode(String taskId, String agentId, String taskType, String outcome, Map<String,String> metadata, Instant timestamp)
extends Record
A single interaction episode.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.static EpisodicMemory.Episodeoutcome()Returns the value of theoutcomerecord component.taskId()Returns the value of thetaskIdrecord component.taskType()Returns the value of thetaskTyperecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Episode
public Episode(String taskId, String agentId, String taskType, String outcome, Map<String, String> metadata, Instant timestamp) Creates an instance of aEpisoderecord class.- Parameters:
taskId- the value for thetaskIdrecord componentagentId- the value for theagentIdrecord componenttaskType- the value for thetaskTyperecord componentoutcome- the value for theoutcomerecord componentmetadata- the value for themetadatarecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
of
-
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). -
taskId
Returns the value of thetaskIdrecord component.- Returns:
- the value of the
taskIdrecord component
-
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
taskType
Returns the value of thetaskTyperecord component.- Returns:
- the value of the
taskTyperecord component
-
outcome
Returns the value of theoutcomerecord component.- Returns:
- the value of the
outcomerecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-