Package dev.dokimos.core.comparison
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 ADDEDcandidatePassProbability- fraction of candidate reps that passed, or null when REMOVEDpassFlip- 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 Summary
ConstructorsConstructorDescriptionItemComparison(String key, ComparisonStatus status, Double baselinePassProbability, Double candidatePassProbability, boolean passFlip, List<EvaluatorDelta> evaluatorDeltas) Creates an instance of aItemComparisonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebaselinePassProbabilityrecord component.Returns the value of thecandidatePassProbabilityrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevaluatorDeltasrecord component.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.booleanpassFlip()Returns the value of thepassFliprecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemComparison
public ItemComparison(String key, ComparisonStatus status, Double baselinePassProbability, Double candidatePassProbability, boolean passFlip, List<EvaluatorDelta> evaluatorDeltas) Creates an instance of aItemComparisonrecord class.- Parameters:
key- the value for thekeyrecord componentstatus- the value for thestatusrecord componentbaselinePassProbability- the value for thebaselinePassProbabilityrecord componentcandidatePassProbability- the value for thecandidatePassProbabilityrecord componentpassFlip- the value for thepassFliprecord componentevaluatorDeltas- the value for theevaluatorDeltasrecord component
-
-
Method Details
-
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 '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
baselinePassProbability
Returns the value of thebaselinePassProbabilityrecord component.- Returns:
- the value of the
baselinePassProbabilityrecord component
-
candidatePassProbability
Returns the value of thecandidatePassProbabilityrecord component.- Returns:
- the value of the
candidatePassProbabilityrecord component
-
passFlip
public boolean passFlip()Returns the value of thepassFliprecord component.- Returns:
- the value of the
passFliprecord component
-
evaluatorDeltas
Returns the value of theevaluatorDeltasrecord component.- Returns:
- the value of the
evaluatorDeltasrecord component
-