Package com.tnsai.refinement
Record Class RefinementResult
java.lang.Object
java.lang.Record
com.tnsai.refinement.RefinementResult
public record RefinementResult(String finalOutput, int iterationCount, List<com.tnsai.refinement.IterationResult> history, RefinementStatus status, Duration totalDuration, Map<String,Object> metrics)
extends Record
Result of a refinement loop execution.
-
Constructor Summary
ConstructorsConstructorDescriptionRefinementResult(String finalOutput, int iterationCount, List<com.tnsai.refinement.IterationResult> history, RefinementStatus status, Duration totalDuration, Map<String, Object> metrics) Creates an instance of aRefinementResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefinalOutputrecord component.doublecom.tnsai.refinement.IterationResultfinal inthashCode()Returns a hash code value for this object.List<com.tnsai.refinement.IterationResult> history()Returns the value of thehistoryrecord component.booleanintReturns the value of theiterationCountrecord component.metrics()Returns the value of themetricsrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalDurationrecord component.
-
Constructor Details
-
RefinementResult
public RefinementResult(String finalOutput, int iterationCount, List<com.tnsai.refinement.IterationResult> history, RefinementStatus status, Duration totalDuration, Map<String, Object> metrics) Creates an instance of aRefinementResultrecord class.- Parameters:
finalOutput- the value for thefinalOutputrecord componentiterationCount- the value for theiterationCountrecord componenthistory- the value for thehistoryrecord componentstatus- the value for thestatusrecord componenttotalDuration- the value for thetotalDurationrecord componentmetrics- the value for themetricsrecord component
-
-
Method Details
-
isSuccess
public boolean isSuccess() -
getLastIteration
public com.tnsai.refinement.IterationResult getLastIteration() -
getFinalScore
public double getFinalScore() -
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 '=='. -
finalOutput
Returns the value of thefinalOutputrecord component.- Returns:
- the value of the
finalOutputrecord component
-
iterationCount
public int iterationCount()Returns the value of theiterationCountrecord component.- Returns:
- the value of the
iterationCountrecord component
-
history
Returns the value of thehistoryrecord component.- Returns:
- the value of the
historyrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
totalDuration
Returns the value of thetotalDurationrecord component.- Returns:
- the value of the
totalDurationrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-