public List<ValidationMessage<Origin>> getMessages(String messageKey) {

        List<ValidationMessage<Origin>> result = new ArrayList<ValidationMessage<Origin>>();

        for (ValidationResult validationResult : results) {
            for (ValidationMessage<Origin> message : validationResult.getMessages()) {
                if (messageKey.equals(message.getMessageKey())) {
                    result.add(message);
                }
            }
        }
        return result;
    }
public List < ValidationMessage < Origin > > getMessages ( String messageKey ) { List < ValidationMessage < Origin > > result = new ArrayList < ValidationMessage < Origin > > ( ) ; for ( ValidationResult validationResult : results ) { for ( ValidationMessage < Origin > message : validationResult . getMessages ( ) ) { if ( messageKey . equals ( message . getMessageKey ( ) ) ) { result . add ( message ) ; } } } return result ; }
Finds validation messages by the message key.

@param messageKey a message key of the message
@return a collection of found validation messages