Record Class ItemComparison

java.lang.Object
java.lang.Record
dev.dokimos.core.comparison.ItemComparison
Record Components:
baselinePassProbability - fraction of baseline reps that passed, or null when ADDED
candidatePassProbability - fraction of candidate reps that passed, or null when REMOVED
passFlip - true when the item flipped pass/fail (rounded probabilities)

public record ItemComparison(String key, ComparisonStatus status, Double baselinePassProbability, Double candidatePassProbability, boolean passFlip, List<EvaluatorDelta> evaluatorDeltas) extends Record
Comparison of a single paired item across baseline and candidate. Pass-probability is the fraction of repetitions in which the item passed all of its evaluations. For ComparisonStatus.ADDED items the baseline side is null; for ComparisonStatus.REMOVED items the candidate side is null.
  • Constructor Details

    • ItemComparison

      public ItemComparison(String key, ComparisonStatus status, Double baselinePassProbability, Double candidatePassProbability, boolean passFlip, List<EvaluatorDelta> evaluatorDeltas)
      Creates an instance of a ItemComparison record class.
      Parameters:
      key - the value for the key record component
      status - the value for the status record component
      baselinePassProbability - the value for the baselinePassProbability record component
      candidatePassProbability - the value for the candidatePassProbability record component
      passFlip - the value for the passFlip record component
      evaluatorDeltas - the value for the evaluatorDeltas record component
  • Method Details

    • 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.
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • status

      public ComparisonStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • baselinePassProbability

      public Double baselinePassProbability()
      Returns the value of the baselinePassProbability record component.
      Returns:
      the value of the baselinePassProbability record component
    • candidatePassProbability

      public Double candidatePassProbability()
      Returns the value of the candidatePassProbability record component.
      Returns:
      the value of the candidatePassProbability record component
    • passFlip

      public boolean passFlip()
      Returns the value of the passFlip record component.
      Returns:
      the value of the passFlip record component
    • evaluatorDeltas

      public List<EvaluatorDelta> evaluatorDeltas()
      Returns the value of the evaluatorDeltas record component.
      Returns:
      the value of the evaluatorDeltas record component