package com.qmth.boot.tools.excel.listener;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

public class ObjectCollector<E> implements ObjectListener<E> {

    private List<E> list;

    public ObjectCollector() {
        this.list = new LinkedList<>();
    }

    @Override
    public void output(E obj) {
        list.add(obj);
    }

    @Override
    public void error(int rowIndex, Collection<String> errorColumns) {
        //
    }

    public List<E> getObjectList() {
        return list;
    }
}
