Package com.tnsai.integration.activity
Record Class AgentActivity.Entry<P>
java.lang.Object
java.lang.Record
com.tnsai.integration.activity.AgentActivity.Entry<P>
- Type Parameters:
P- how the caller identifies a peer- Record Components:
kind- what the entry describestick- the tick at which it happenedpeers- the other agents involved, empty when there are nonetype- the message type or the action name, redacted, on one line and at most the per-entry cap long, ornullfor a note or when there is nonefailed- whether an action failed; alwaysfalsefor other kindstext- the redacted text, on one line, and with the type at most the per-entry cap longtruncated- whether the text was cut short, by the caller or to fit the per-entry cap
- Enclosing class:
AgentActivity<P>
public static record AgentActivity.Entry<P>(AgentActivity.Kind kind, double tick, List<P> peers, String type, boolean failed, String text, boolean truncated)
extends Record
One entry of the record.
- Since:
- 0.18.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanfailed()Returns the value of thefailedrecord component.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.peers()Returns the value of thepeersrecord component.text()Returns the value of thetextrecord component.doubletick()Returns the value of thetickrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thetruncatedrecord component.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Entry
public Entry(AgentActivity.Kind kind, double tick, List<P> peers, String type, boolean failed, String text, boolean truncated) Creates an instance of aEntryrecord class.- Parameters:
kind- the value for thekindrecord componenttick- the value for thetickrecord componentpeers- the value for thepeersrecord componenttype- the value for thetyperecord componentfailed- the value for thefailedrecord componenttext- the value for thetextrecord componenttruncated- the value for thetruncatedrecord 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 '=='. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
tick
public double tick()Returns the value of thetickrecord component.- Returns:
- the value of the
tickrecord component
-
peers
Returns the value of thepeersrecord component.- Returns:
- the value of the
peersrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
failed
public boolean failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
truncated
public boolean truncated()Returns the value of thetruncatedrecord component.- Returns:
- the value of the
truncatedrecord component
-