All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.swak.excel.metadata.ExcelWriteDynamicData Maven / Gradle / Ivy

The newest version!
package com.swak.excel.metadata;

import com.google.common.collect.Lists;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;

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

@Data
public class ExcelWriteDynamicData extends ExcelWriteData> {
    /**
     * 头部信息
     */
    private List> heads = new ArrayList<>();

    public void head(String... heads) {
        head(Arrays.asList(heads));
    }

    public void head(List headList) {
        if (CollectionUtils.isNotEmpty(headList)) {
            headList.forEach(head -> {
                this.heads.add(Lists.newArrayList(head));
            });
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy