Class ValidationResult
- java.lang.Object
-
- app.coronawarn.server.services.distribution.assembly.appconfig.validation.ValidationResult
-
public class ValidationResult extends Object
The result of a validation run for Exposure Configurations. Find details about possible errors in this collection.
-
-
Constructor Summary
Constructors Constructor Description ValidationResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(ValidationError error)Adds aValidationErrorto thisValidationResult.booleanequals(Object o)booleanhasError(ValidationError error)booleanhasErrors()Checks whether this validation result instance has at least one error.inthashCode()StringtoString()ValidationResultwith(ValidationResult other)Adds all validation errors of the given result to this one, effectively merging them.
-
-
-
Method Detail
-
add
public boolean add(ValidationError error)
Adds aValidationErrorto thisValidationResult.- Parameters:
error- TheValidationErrorthat shall be added.- Returns:
- true if this
ValidationResultdid not already contain the specifiedValidationError.
-
hasErrors
public boolean hasErrors()
Checks whether this validation result instance has at least one error.- Returns:
- true if yes, false otherwise
-
hasError
public boolean hasError(ValidationError error)
-
with
public ValidationResult with(ValidationResult other)
Adds all validation errors of the given result to this one, effectively merging them.- Parameters:
other- the other validation result to merge- Returns:
- this instance
-
-