Record Class TeamResult.MemberOutput
java.lang.Object
java.lang.Record
com.tnsai.coordination.groups.team.TeamResult.MemberOutput
- Record Components:
agentId- agent IDrole- member's roleoutput- member's outputsuccess- whether member succeededdurationMs- execution time in millisecondserror- error if failed
- Enclosing class:
TeamResult
public static record TeamResult.MemberOutput(String agentId, TeamRole role, String output, boolean success, long durationMs, String error)
extends Record
Individual member's output.
-
Constructor Summary
ConstructorsConstructorDescriptionMemberOutput(String agentId, TeamRole role, String output, boolean success, long durationMs, String error) Creates an instance of aMemberOutputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.longReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static TeamResult.MemberOutputCreates a failed output.final inthashCode()Returns a hash code value for this object.output()Returns the value of theoutputrecord component.role()Returns the value of therolerecord component.booleansuccess()Returns the value of thesuccessrecord component.static TeamResult.MemberOutputCreates a successful output.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MemberOutput
public MemberOutput(String agentId, TeamRole role, String output, boolean success, long durationMs, String error) Creates an instance of aMemberOutputrecord class.- Parameters:
agentId- the value for theagentIdrecord componentrole- the value for therolerecord componentoutput- the value for theoutputrecord componentsuccess- the value for thesuccessrecord componentdurationMs- the value for thedurationMsrecord componenterror- the value for theerrorrecord component
-
-
Method Details
-
success
public static TeamResult.MemberOutput success(String agentId, TeamRole role, String output, long durationMs) Creates a successful output. -
failure
public static TeamResult.MemberOutput failure(String agentId, TeamRole role, String error, long durationMs) Creates a failed output. -
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 '=='. -
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
output
Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
durationMs
public long durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-