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

io.github.af19git5.builder.ExcelStreamCellBuilder Maven / Gradle / Ivy

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy