Package com.tnsai.planning.llm
Record Class StepExecutionResult
java.lang.Object
java.lang.Record
com.tnsai.planning.llm.StepExecutionResult
- Record Components:
success- whether the step executed successfullyoutput- output/result from the step executionerror- error message if execution failed (null on success)
Result of executing a single plan step.
- Since:
- 0.3.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStepExecutionResult(boolean success, String output, String error) Creates an instance of aStepExecutionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static StepExecutionResultCreates a failure result.static StepExecutionResultCreates a failure result with partial output.final inthashCode()Returns a hash code value for this object.output()Returns the value of theoutputrecord component.booleansuccess()Returns the value of thesuccessrecord component.static StepExecutionResultCreates a successful result.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
success
Creates a successful result. -
failure
Creates a failure result. -
failure
Creates a failure result with partial 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 '=='. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
output
Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-