Class ValidatorImpl
- java.lang.Object
-
- com.expediagroup.transformer.validator.ValidatorImpl
-
-
Constructor Summary
Constructors Constructor Description ValidatorImpl()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K> java.util.Set<jakarta.validation.ConstraintViolation<java.lang.Object>>
getConstraintViolations(K k)
Checks if an object is valid and returns the list of the constraints not met.<K> java.util.List<java.lang.String>
getConstraintViolationsMessages(K k)
Checks if an object is valid and returns the list of the constraints messages not met.<K> void
validate(K k)
Checks if an object is valid.
-
-
-
Method Detail
-
getConstraintViolations
public final <K> java.util.Set<jakarta.validation.ConstraintViolation<java.lang.Object>> getConstraintViolations(K k)
Checks if an object is valid and returns the list of the constraints not met.- Specified by:
getConstraintViolations
in interfaceValidator
- Type Parameters:
K
- the object class- Parameters:
k
- the object to check- Returns:
- the list of violated constraints.
-
getConstraintViolationsMessages
public final <K> java.util.List<java.lang.String> getConstraintViolationsMessages(K k)
Checks if an object is valid and returns the list of the constraints messages not met.- Specified by:
getConstraintViolationsMessages
in interfaceValidator
- Type Parameters:
K
- the object class- Parameters:
k
- the object to check- Returns:
- the list of violated constraints messages.
-
-