Package com.tnsai.context.ephemeral
Record Class EphemeralContextManager.TrackedResult
java.lang.Object
java.lang.Record
com.tnsai.context.ephemeral.EphemeralContextManager.TrackedResult
- Enclosing class:
EphemeralContextManager
public static record EphemeralContextManager.TrackedResult(String id, String actionName, long timestamp, Object result)
extends Record
Tracks a single tool result.
-
Constructor Summary
ConstructorsConstructorDescriptionTrackedResult(String actionName, Object result) TrackedResult(String id, String actionName, long timestamp, Object result) Creates an instance of aTrackedResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.result()Returns the value of theresultrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TrackedResult
-
TrackedResult
Creates an instance of aTrackedResultrecord class.- Parameters:
id- the value for theidrecord componentactionName- the value for theactionNamerecord componenttimestamp- the value for thetimestamprecord componentresult- the value for theresultrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
actionName
Returns the value of theactionNamerecord component.- Returns:
- the value of the
actionNamerecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-