Package com.tnsai.planning
Record Class PlannerHandle.PlanResult
java.lang.Object
java.lang.Record
com.tnsai.planning.PlannerHandle.PlanResult
- Record Components:
success- true if all steps executed successfullyresults- per-step execution resultsfinalState- agent state after plan execution
- Enclosing interface:
PlannerHandle
public static record PlannerHandle.PlanResult(boolean success, List<PlannerHandle.StepResult> results, Map<String,Object> finalState)
extends Record
Result of executing a plan.
-
Constructor Summary
ConstructorsConstructorDescriptionPlanResult(boolean success, List<PlannerHandle.StepResult> results, Map<String, Object> finalState) Creates an instance of aPlanResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the number of successfully executed steps.intReturns the number of failed steps.Returns the value of thefinalStaterecord component.final inthashCode()Returns a hash code value for this object.results()Returns the value of theresultsrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlanResult
public PlanResult(boolean success, List<PlannerHandle.StepResult> results, Map<String, Object> finalState) Creates an instance of aPlanResultrecord class.- Parameters:
success- the value for thesuccessrecord componentresults- the value for theresultsrecord componentfinalState- the value for thefinalStaterecord component
-
-
Method Details
-
executedCount
public int executedCount()Returns the number of successfully executed steps. -
failedCount
public int failedCount()Returns the number of failed steps. -
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 '=='. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-
finalState
Returns the value of thefinalStaterecord component.- Returns:
- the value of the
finalStaterecord component
-