Class TaskResultValidator.ValidationReport
java.lang.Object
neqsim.util.agentic.TaskResultValidator.ValidationReport
- All Implemented Interfaces:
Serializable
- Enclosing class:
TaskResultValidator
Report of validation results for a results.json file.
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA single validation issue. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<TaskResultValidator.ValidationReport.Issue> private static final longprivate final List<TaskResultValidator.ValidationReport.Issue> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an error.voidaddWarning(String field, String message) Add a warning.intGet the error count.Get all errors.intGet the warning count.Get all warnings.booleanisValid()Check if the results.json is valid (no errors, warnings are OK).toJson()Serialize the report to JSON.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
errors
-
warnings
-
-
Constructor Details
-
ValidationReport
public ValidationReport()Constructor.
-
-
Method Details
-
addError
-
addWarning
-
isValid
public boolean isValid()Check if the results.json is valid (no errors, warnings are OK).- Returns:
- true if no errors found
-
getErrorCount
public int getErrorCount()Get the error count.- Returns:
- number of errors
-
getWarningCount
public int getWarningCount()Get the warning count.- Returns:
- number of warnings
-
getErrors
Get all errors.- Returns:
- unmodifiable list of errors
-
getWarnings
Get all warnings.- Returns:
- unmodifiable list of warnings
-
toJson
-