org.exparity.data.xml.ValidationResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of exparity-data Show documentation
Show all versions of exparity-data Show documentation
Data scraping and manipulation utilities for Java
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);
}
}