Class AuditFinding

java.lang.Object
edu.cmu.tetrad.data.audit.AuditFinding

public final class AuditFinding extends Object
A single immutable finding produced by a DataAudit: a machine-readable code, a severity, the names of the variables involved, a map of named numeric values supporting the finding, and a human-readable message. Findings describe properties of the data; they never recommend actions.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • AuditFinding

      public AuditFinding(FindingCode code, AuditFinding.Severity severity, List<String> variables, Map<String,Double> values, String message)
      Constructs a finding. Defensive unmodifiable copies are made of the collection arguments.
      Parameters:
      code - the machine-readable code; may not be null.
      severity - the severity; may not be null.
      variables - the names of the variables involved; may not be null (may be empty).
      values - named numeric values supporting the finding; may not be null (may be empty).
      message - a human-readable one-line message; may not be null.
  • Method Details

    • getCode

      public FindingCode getCode()
      Returns the machine-readable code for this finding.
      Returns:
      This code.
    • getSeverity

      public AuditFinding.Severity getSeverity()
      Returns the severity of this finding.
      Returns:
      This severity.
    • getVariables

      public List<String> getVariables()
      Returns the names of the variables involved in this finding, unmodifiable.
      Returns:
      These names.
    • getValues

      public Map<String,Double> getValues()
      Returns the named numeric values supporting this finding, unmodifiable, in insertion order.
      Returns:
      These values.
    • getMessage

      public String getMessage()
      Returns the human-readable one-line message for this finding.
      Returns:
      This message.
    • toString

      public String toString()
      Returns a one-line rendering of this finding, of the form "SEVERITY CODE [vars]: message".
      Overrides:
      toString in class Object
      Returns:
      This rendering.