Package com.tnsai.agents.variant
Record Class VariantSelector.SelectionResult
java.lang.Object
java.lang.Record
com.tnsai.agents.variant.VariantSelector.SelectionResult
- Enclosing class:
VariantSelector
public static record VariantSelector.SelectionResult(AgentVariant variant, VariantSelector.SelectionReason reason, double confidenceScore, String reasoning)
extends Record
Selection result with reasoning.
-
Constructor Summary
ConstructorsConstructorDescriptionSelectionResult(AgentVariant variant, VariantSelector.SelectionReason reason, double confidenceScore, String reasoning) Creates an instance of aSelectionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theconfidenceScorerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.Returns the value of thereasoningrecord component.final StringtoString()Returns a string representation of this record class.variant()Returns the value of thevariantrecord component.booleanReturns true if budget affected selection.booleanReturns true if selection was overridden by annotation.
-
Constructor Details
-
SelectionResult
public SelectionResult(AgentVariant variant, VariantSelector.SelectionReason reason, double confidenceScore, String reasoning) Creates an instance of aSelectionResultrecord class.- Parameters:
variant- the value for thevariantrecord componentreason- the value for thereasonrecord componentconfidenceScore- the value for theconfidenceScorerecord componentreasoning- the value for thereasoningrecord component
-
-
Method Details
-
wasOverridden
public boolean wasOverridden()Returns true if selection was overridden by annotation. -
wasBudgetConstrained
public boolean wasBudgetConstrained()Returns true if budget affected selection. -
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 '=='. -
variant
Returns the value of thevariantrecord component.- Returns:
- the value of the
variantrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
confidenceScore
public double confidenceScore()Returns the value of theconfidenceScorerecord component.- Returns:
- the value of the
confidenceScorerecord component
-
reasoning
Returns the value of thereasoningrecord component.- Returns:
- the value of the
reasoningrecord component
-