com.swak.excel.metadata.ExcelWriteDynamicData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swak-excel-boot-starter Show documentation
Show all versions of swak-excel-boot-starter Show documentation
swak component of excel spring boot starter
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));
});
}
}
}