io.github.af19git5.builder.ExcelStreamCellBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easy-excel Show documentation
Show all versions of easy-excel Show documentation
Easy to do read or write excel.
The newest version!
package io.github.af19git5.builder;
import io.github.af19git5.entity.ExcelStreamCell;
import io.github.af19git5.entity.ExcelStreamStyle;
import lombok.NonNull;
import org.apache.poi.ss.usermodel.CellType;
/**
* Excel欄位資料建構器(資料流輸出)
*
* @author Jimmy Kang
*/
public class ExcelStreamCellBuilder {
private final ExcelStreamCell cell;
public ExcelStreamCellBuilder(@NonNull Integer row, @NonNull Integer column, String value) {
cell = new ExcelStreamCell(row, column, value);
}
public ExcelStreamCellBuilder cellType(@NonNull CellType cellType) {
cell.setCellType(cellType);
return this;
}
public ExcelStreamCellBuilder style(@NonNull ExcelStreamStyle style) {
cell.setStyle(style);
return this;
}
public ExcelStreamCell build() {
return cell;
}
}