public boolean apply(final Class<?> type, final Object value, final List<ValidationFailure> validationFailures) {
        if (getRequiredValueType().isAssignableFrom(value.getClass())) {
            validate(type, value, validationFailures);
            return true;
        }
        return false;
    }
public boolean apply ( final Class < ? > type , final Object value , final List < ValidationFailure > validationFailures ) { if ( getRequiredValueType ( ) . isAssignableFrom ( value . getClass ( ) ) ) { validate ( type , value , validationFailures ) ; return true ; } return false ; }
Applied validation for the given field.  If the value does not match the correct type, the validation is not applied and this method
returns false.  If the value is to be validated, then the validate method is called to see if the value and type are compatible.
Errors are appended to the validationFailures list.

@param type               the Class of the field being queried
@param value              the non-null value being used for a query
@param validationFailures the list to add any failures to. If validation passes or {@code appliesTo} returned false, this list will
not change.
@return true if validation was applied, false if this validation doesn't apply to this field type.