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 boolean
add(ValidationError error)
Adds aValidationError
to thisValidationResult
.boolean
equals(Object o)
boolean
hasError(ValidationError error)
boolean
hasErrors()
Checks whether this validation result instance has at least one error.int
hashCode()
String
toString()
ValidationResult
with(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 aValidationError
to thisValidationResult
.- Parameters:
error
- TheValidationError
that shall be added.- Returns:
- true if this
ValidationResult
did 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
-
-