Class CheckResult

java.lang.Object
io.github.sergeloie.languagecheck.check.CheckResult

public final class CheckResult extends Object
The outcome of CharacterChecker.check(java.lang.String, io.github.sergeloie.languagecheck.check.CharPolicy, int) for one file: a bounded list of detailed Violation samples plus the total violation count.

total may exceed samples.size() when the sample cap configured for the run was reached - the total is always exact.

  • Constructor Details

    • CheckResult

      public CheckResult(List<Violation> samples, int total)
  • Method Details

    • clean

      public static CheckResult clean()
      A result with no violations.
    • samples

      public List<Violation> samples()
      The detailed violations (bounded by the run's sample cap).
    • total

      public int total()
      The exact total number of violations in the file.
    • isClean

      public boolean isClean()
      True if the file had no violations at all.