java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.AssertTrueValidator
All Implemented Interfaces:
ConstraintValidator<AssertTrue,Boolean>

public class AssertTrueValidator extends Object implements ConstraintValidator<AssertTrue,Boolean>
Validates that the value passed is true
Author:
Alaa Nassef
  • Constructor Details

    • AssertTrueValidator

      public AssertTrueValidator()
  • Method Details

    • isValid

      public boolean isValid(Boolean bool, ConstraintValidatorContext constraintValidatorContext)
      Description copied from interface: ConstraintValidator
      Implements the validation logic. The state of value must not be altered.

      This method can be accessed concurrently, thread-safety must be ensured by the implementation.

      Specified by:
      isValid in interface ConstraintValidator<AssertTrue,Boolean>
      Parameters:
      bool - object to validate
      constraintValidatorContext - context in which the constraint is evaluated
      Returns:
      false if value does not pass the constraint