Record Class Diagnosis

java.lang.Object
java.lang.Record
com.shaft.doctor.model.Diagnosis
Record Components:
schemaVersion - diagnosis schema version
primaryCause - highest-precedence supported cause
contributingCauses - other supported causes
confidence - confidence in the primary cause
summary - concise diagnosis
rationale - rule precedence and uncertainty explanation
findings - cited observations and inferences
remediations - deterministic next actions
missingEvidence - evidence gaps that limit certainty

public record Diagnosis(String schemaVersion, CauseCategory primaryCause, List<CauseCategory> contributingCauses, Confidence confidence, String summary, String rationale, List<Finding> findings, List<Remediation> remediations, List<String> missingEvidence) extends Record
Versioned deterministic diagnosis.
  • Field Details

    • CURRENT_SCHEMA_VERSION

      public static final String CURRENT_SCHEMA_VERSION
      Current diagnosis schema version.
      See Also:
  • Constructor Details

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

      public String schemaVersion()
      Returns the value of the schemaVersion record component.
      Returns:
      the value of the schemaVersion record component
    • primaryCause

      public CauseCategory primaryCause()
      Returns the value of the primaryCause record component.
      Returns:
      the value of the primaryCause record component
    • contributingCauses

      public List<CauseCategory> contributingCauses()
      Returns the value of the contributingCauses record component.
      Returns:
      the value of the contributingCauses record component
    • confidence

      public Confidence confidence()
      Returns the value of the confidence record component.
      Returns:
      the value of the confidence record component
    • summary

      public String summary()
      Returns the value of the summary record component.
      Returns:
      the value of the summary record component
    • rationale

      public String rationale()
      Returns the value of the rationale record component.
      Returns:
      the value of the rationale record component
    • findings

      public List<Finding> findings()
      Returns the value of the findings record component.
      Returns:
      the value of the findings record component
    • remediations

      public List<Remediation> remediations()
      Returns the value of the remediations record component.
      Returns:
      the value of the remediations record component
    • missingEvidence

      public List<String> missingEvidence()
      Returns the value of the missingEvidence record component.
      Returns:
      the value of the missingEvidence record component