Package com.tnsai.skills
Record Class ActiveSkill
java.lang.Object
java.lang.Record
com.tnsai.skills.ActiveSkill
public record ActiveSkill(Skill skill, String renderedBody, List<String> arguments, Map<String,String> environment, Instant activatedAt)
extends Record
Runtime snapshot of a skill that has been activated for an agent
session (TNS-289). Distinct from
Skill (the static
definition) — this record captures the substituted body, the
arguments it was invoked with, and the activation time.- Since:
- 0.10.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactivatedAtrecord component.Returns the value of theargumentsrecord component.Returns the value of theenvironmentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of therenderedBodyrecord component.skill()Returns the value of theskillrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ActiveSkill
public ActiveSkill(Skill skill, String renderedBody, List<String> arguments, Map<String, String> environment, Instant activatedAt) Creates an instance of aActiveSkillrecord class.- Parameters:
skill- the value for theskillrecord componentrenderedBody- the value for therenderedBodyrecord componentarguments- the value for theargumentsrecord componentenvironment- the value for theenvironmentrecord componentactivatedAt- the value for theactivatedAtrecord component
-
-
Method Details
-
name
-
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). -
skill
Returns the value of theskillrecord component.- Returns:
- the value of the
skillrecord component
-
renderedBody
Returns the value of therenderedBodyrecord component.- Returns:
- the value of the
renderedBodyrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
environment
Returns the value of theenvironmentrecord component.- Returns:
- the value of the
environmentrecord component
-
activatedAt
Returns the value of theactivatedAtrecord component.- Returns:
- the value of the
activatedAtrecord component
-