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

org.exparity.data.xml.ValidationResult Maven / Gradle / Ivy

The newest version!

package org.exparity.data.xml;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author Stewart Bissett
 */
public class ValidationResult {

    private final List faults = new ArrayList();
    private final boolean isValid;

    public ValidationResult(final boolean isValid, final List faults) {
        this.isValid = isValid;
        this.faults.addAll(faults);
    }

    public ValidationResult(final boolean isValid, final String... faults) {
        this(isValid, Arrays.asList(faults));
    }

    public boolean isValid() {
        return isValid;
    }

    public List getFaults() {
        return Collections.unmodifiableList(faults);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy