package cn.exploring.engine.server.db.util.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

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

public class ExcelReaderListener<T> extends AnalysisEventListener<T> {

    List<T> addList = new ArrayList<>();

    public List<T> getAddList() {
        return addList;
    }

    public void setAddList(List<T> addList) {
        this.addList = addList;
    }

    @Override
    public void invoke(T t, AnalysisContext analysisContext) {
        addList.add(t);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

}
