Record Class RankedCause
java.lang.Object
java.lang.Record
com.shaft.doctor.model.RankedCause
- Record Components:
category- cause category this entry rankstrustPercentage- deterministic trust in the 5-95 range (never 0 or 100; seecom.shaft.doctor.analysis.DeterministicTrustScorer)confidence- rule confidence band backing this causerationale- human-readable explanation of how the trust score was computedevidenceIds- cited evidence identifiers supporting this causefixPrompt- self-contained, copy/paste-ready prompt describing the recommended fix
public record RankedCause(CauseCategory category, int trustPercentage, Confidence confidence, String rationale, List<String> evidenceIds, String fixPrompt)
extends Record
One ranked candidate root cause emitted alongside the legacy single-primary-cause fields.
Unlike Diagnosis.primaryCause(), which names exactly one supported cause, a
diagnosis may carry several RankedCause entries -- including in the case where
Doctor deliberately declines to pick a single primary cause because independent evidence
supports more than one. Each entry is independently trusted, cited, and actionable.
-
Constructor Summary
ConstructorsConstructorDescriptionRankedCause(CauseCategory category, int trustPercentage, Confidence confidence, String rationale, List<String> evidenceIds, String fixPrompt) Creates a validated immutable ranked cause. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.Returns the value of theconfidencerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevidenceIdsrecord component.Returns the value of thefixPromptrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of therationalerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetrustPercentagerecord component.
-
Constructor Details
-
RankedCause
public RankedCause(CauseCategory category, int trustPercentage, Confidence confidence, String rationale, List<String> evidenceIds, String fixPrompt) Creates a validated immutable ranked cause.
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
category
-
trustPercentage
public int trustPercentage()Returns the value of thetrustPercentagerecord component.- Returns:
- the value of the
trustPercentagerecord component
-
confidence
Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
rationale
-
evidenceIds
Returns the value of theevidenceIdsrecord component.- Returns:
- the value of the
evidenceIdsrecord component
-
fixPrompt
-