}
private <V extends ValidationMessages> ValidationResult result(
ValidatorAlgorithmResult result, V messages) {
ValidationResult ret;
if (CharacterValidatorAlgorithm.NOT_A_VALID_CHARACTER == result
.getErrorCode()) {
ret = new ValidationResult(getErrorMessage(messages, messages
.getStandardMessages().notAValidCharacter(
((Character) result.getParameters()[0])),
result.getParameters()));
} else {
ret = new ValidationResult(
"Unknown error code for CharacterValidator");
}
return ret;
}