package ${basePackage}.frame.excel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * WRow - Excel行对象，即数据WCell容器<br>继承至HashMap<String, WCell>,key为列名，value为单元对象
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class WRow extends HashMap<String, WCell> implements Serializable {

    private List<String> errorList = new ArrayList<>();

    public final boolean hasError() {
        return errorList.size() > 0;
    }

    public final void addError(String errorMsg) {
        errorList.add(errorMsg);
    }

    public final void addErrors(List<String> errorMsgs) {
        errorList.addAll(errorMsgs);
    }

    public List<String> getErrorList() {
        return errorList;
    }
}
