All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.validation.ValidationErrorCollector Maven / Gradle / Ivy

package graphql.validation;


import java.util.ArrayList;
import java.util.List;

public class ValidationErrorCollector {

    private final List errors = new ArrayList<>();

    public void addError(ValidationError validationError) {
        this.errors.add(validationError);
    }

    public List getErrors() {
        return errors;
    }

    public boolean containsValidationError(ValidationErrorType validationErrorType) {
        for (ValidationError validationError : errors) {
            if (validationError.getValidationErrorType() == validationErrorType) return true;
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy