package poussecafe.source.validation;

import java.util.List;

import static java.util.Objects.requireNonNull;

public class ValidationResult {

    public ValidationResult(List<ValidationMessage> messages) {
        requireNonNull(messages);
        this.messages = messages;
    }

    private List<ValidationMessage> messages;

    public List<ValidationMessage> messages() {
        return messages;
    }
}

@@ -402,11 +402,342 @@
 s;%0A    %7D
+%0A%0A    public boolean hasError() %7B%0A        return hasType(ValidationMessageType.ERROR);%0A    %7D%0A%0A    private boolean hasType(ValidationMessageType type) %7B%0A        return messages.stream().anyMatch(message -%3E message.type() == type);%0A    %7D%0A%0A    public boolean hasWarning() %7B%0A        return hasType(ValidationMessageType.WARNING);%0A    %7D
 %0A%7D%0A

add helper methdods to validation result.