com.qingcha.verifier.core.VerifyResult Maven / Gradle / Ivy
package com.qingcha.verifier.core;
import java.util.ArrayList;
import java.util.List;
/**
* @author qiqiang
*/
public class VerifyResult {
private final List verifyResponses = new ArrayList<>();
public void addWarning(VerifyResponse verifyResponse) {
this.verifyResponses.add(verifyResponse);
}
public void addAllWarning(List verifyResponses) {
this.verifyResponses.addAll(verifyResponses);
}
public void addAllWarning(VerifyResult verifyResult) {
this.verifyResponses.addAll(verifyResult.getVerifyResponses());
}
public List getVerifyResponses() {
return verifyResponses;
}
public void clear() {
this.verifyResponses.clear();
}
public boolean hasWarning() {
return !verifyResponses.isEmpty();
}
@Override
public String toString() {
return "VerifyResult{" +
"verifyResponses=" + verifyResponses +
'}';
}
}