/** * Validates the given Object. * * @param b * the boolean to validate * @param context * the ValidationContext * @throws ValidationException if the object fails validation. */ public void validate(final boolean b, final ValidationContext context) throws ValidationException { if (_useFixed && b != _fixed) { String err = "boolean " + b + " is not equal to the fixed value: " + _fixed; throw new ValidationException(err); } if (hasPattern()) { super.validate(new Boolean(b).toString(), context); } } //-- validate
/** * Validates the given Object. * * @param b the boolean to validate * @param context the ValidationContext * @throws ValidationException if the object fails validation. */ public void validate(final boolean b, final ValidationContext context) throws ValidationException { if (_useFixed && b != _fixed) { String err = "boolean " + b + " is not equal to the fixed value: " + _fixed; throw new ValidationException(err); } if (hasPattern()) { super.validate(String.valueOf(b), context); } } // -- validate