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 Details

    • SelectionResult

      public SelectionResult(AgentVariant variant, VariantSelector.SelectionReason reason, double confidenceScore, String reasoning)
      Creates an instance of a SelectionResult record class.
      Parameters:
      variant - the value for the variant record component
      reason - the value for the reason record component
      confidenceScore - the value for the confidenceScore record component
      reasoning - the value for the reasoning record 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • variant

      public AgentVariant variant()
      Returns the value of the variant record component.
      Returns:
      the value of the variant record component
    • reason

      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • confidenceScore

      public double confidenceScore()
      Returns the value of the confidenceScore record component.
      Returns:
      the value of the confidenceScore record component
    • reasoning

      public String reasoning()
      Returns the value of the reasoning record component.
      Returns:
      the value of the reasoning record component