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

com.alibaba.excel.metadata.Sheet Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
package com.alibaba.excel.metadata;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author jipengfei
 * @deprecated pleas use {@link com.alibaba.excel.write.metadata.WriteSheet} or
 *             {@link com.alibaba.excel.read.metadata.ReadSheet}
 */
@Deprecated
public class Sheet {

    /**
     */
    private int headLineMun;

    /**
     * Starting from 1
     */
    private int sheetNo;

    /**
     */
    private String sheetName;

    /**
     */
    private Class clazz;

    /**
     */
    private List> head;

    /**
     *
     */
    private TableStyle tableStyle;

    /**
     * column with
     */
    private Map columnWidthMap = new HashMap();

    /**
     *
     */
    private Boolean autoWidth = Boolean.FALSE;

    /**
     *
     */
    private int startRow = 0;

    public Sheet(int sheetNo) {
        this.sheetNo = sheetNo;
    }

    public Sheet(int sheetNo, int headLineMun) {
        this.sheetNo = sheetNo;
        this.headLineMun = headLineMun;
    }

    public Sheet(int sheetNo, int headLineMun, Class clazz) {
        this.sheetNo = sheetNo;
        this.headLineMun = headLineMun;
        this.clazz = clazz;
    }

    public Sheet(int sheetNo, int headLineMun, Class clazz, String sheetName,
        List> head) {
        this.sheetNo = sheetNo;
        this.clazz = clazz;
        this.headLineMun = headLineMun;
        this.sheetName = sheetName;
        this.head = head;
    }

    public List> getHead() {
        return head;
    }

    public void setHead(List> head) {
        this.head = head;
    }

    public Class getClazz() {
        return clazz;
    }

    public void setClazz(Class clazz) {
        this.clazz = clazz;
        if (headLineMun == 0) {
            this.headLineMun = 1;
        }
    }

    public int getHeadLineMun() {
        return headLineMun;
    }

    public void setHeadLineMun(int headLineMun) {
        this.headLineMun = headLineMun;
    }

    public int getSheetNo() {
        return sheetNo;
    }

    public void setSheetNo(int sheetNo) {
        this.sheetNo = sheetNo;
    }

    public String getSheetName() {
        return sheetName;
    }

    public void setSheetName(String sheetName) {
        this.sheetName = sheetName;
    }

    public TableStyle getTableStyle() {
        return tableStyle;
    }

    public void setTableStyle(TableStyle tableStyle) {
        this.tableStyle = tableStyle;
    }

    public Map getColumnWidthMap() {
        return columnWidthMap;
    }

    public void setColumnWidthMap(Map columnWidthMap) {
        this.columnWidthMap = columnWidthMap;
    }

    @Override
    public String toString() {
        return "Sheet{" + "headLineMun=" + headLineMun + ", sheetNo=" + sheetNo + ", sheetName='" + sheetName + '\''
            + ", clazz=" + clazz + ", head=" + head + ", tableStyle=" + tableStyle + ", columnWidthMap="
            + columnWidthMap + '}';
    }

    public Boolean getAutoWidth() {
        return autoWidth;
    }

    public void setAutoWidth(Boolean autoWidth) {
        this.autoWidth = autoWidth;
    }

    public int getStartRow() {
        return startRow;
    }

    public void setStartRow(int startRow) {
        this.startRow = startRow;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy