Package de.telekom.jsonfilter.operator
Class ValidationResult
java.lang.Object
de.telekom.jsonfilter.operator.ValidationResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidationResultvalid()Creates and returns a new instance of ValidationResult indicating a successful validationstatic ValidationResultCreates and returns a new instance of ValidationResult with an error messagestatic ValidationResultwithError(String error, OperatorEnum operator) Creates and returns a new instance of ValidationResult with an error message and an operator
-
Constructor Details
-
ValidationResult
public ValidationResult()
-
-
Method Details
-
withError
Creates and returns a new instance of ValidationResult with an error message- Parameters:
error- the error message to be associated with the validation result- Returns:
- ValidationResult an instance of ValidationResult with the 'valid' attribute set to false and the 'validationError' set to the provided error message
-
withError
Creates and returns a new instance of ValidationResult with an error message and an operator- Parameters:
error- the error message to be associated with the validation resultoperator- the OperatorEnum object to be associated with the validation result- Returns:
- ValidationResult an instance of ValidationResult with the 'valid' attribute set to false, the 'validationError' set to the provided error message and the 'operator' set to the provided operator
-
valid
Creates and returns a new instance of ValidationResult indicating a successful validation- Returns:
- ValidationResult an instance of ValidationResult with the 'valid' attribute set to true
-