Record Class Evaluator.EvalResult

Object
Record
akka.javasdk.testkit.eval.Evaluator.EvalResult
Record Components:
evaluator - the label of the evaluator that produced this result. The runner fills it in from the evaluator's EvalLabel, so an evaluator leaves it empty.
detail - the reason, printed under a failed case
Enclosing interface:
Evaluator

public static record Evaluator.EvalResult(String evaluator, Evaluator.EvalResult.Verdict verdict, String detail) extends Record
What an evaluator found on one turn. This is what a ExperimentRunner.CaseResult holds.
  • Constructor Details

    • EvalResult

      public EvalResult(String evaluator, Evaluator.EvalResult.Verdict verdict, String detail)
      Creates an instance of a EvalResult record class.
      Parameters:
      evaluator - the value for the evaluator record component
      verdict - the value for the verdict record component
      detail - the value for the detail record component
  • Method Details

    • pass

      public static Evaluator.EvalResult pass()
    • pass

      public static Evaluator.EvalResult pass(String detail)
      A pass with something to print, such as a score.
    • fail

      public static Evaluator.EvalResult fail(String detail)
    • inconclusive

      public static Evaluator.EvalResult inconclusive(String detail)
      The evidence this check needs is absent or does not support a verdict; neither a pass nor a fail.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • evaluator

      public String evaluator()
      Returns the value of the evaluator record component.
      Returns:
      the value of the evaluator record component
    • verdict

      public Evaluator.EvalResult.Verdict verdict()
      Returns the value of the verdict record component.
      Returns:
      the value of the verdict record component
    • detail

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