AnalysisCell.java 2.4 KB
Newer Older
庄家钜's avatar
庄家钜 已提交
1 2 3 4
package com.alibaba.excel.write.metadata.fill;

import java.util.List;

庄家钜's avatar
庄家钜 已提交
5 6
import com.alibaba.excel.enums.WriteTemplateAnalysisCellTypeEnum;

庄家钜's avatar
庄家钜 已提交
7 8 9 10 11 12 13 14 15
/**
 * Read the cells of the template while populating the data.
 *
 * @author Jiaju Zhuang
 **/
public class AnalysisCell {
    private int columnIndex;
    private int rowIndex;
    private List<String> variableList;
庄家钜's avatar
庄家钜 已提交
16 17 18
    private List<String> prepareDataList;
    private Boolean onlyOneVariable;
    private WriteTemplateAnalysisCellTypeEnum cellType;
庄家钜's avatar
庄家钜 已提交
19 20
    private String prefix;
    private Boolean firstRow;
庄家钜's avatar
庄家钜 已提交
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

    public int getColumnIndex() {
        return columnIndex;
    }

    public void setColumnIndex(int columnIndex) {
        this.columnIndex = columnIndex;
    }

    public int getRowIndex() {
        return rowIndex;
    }

    public void setRowIndex(int rowIndex) {
        this.rowIndex = rowIndex;
    }

    public List<String> getVariableList() {
        return variableList;
    }

    public void setVariableList(List<String> variableList) {
        this.variableList = variableList;
    }

庄家钜's avatar
庄家钜 已提交
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
    public List<String> getPrepareDataList() {
        return prepareDataList;
    }

    public void setPrepareDataList(List<String> prepareDataList) {
        this.prepareDataList = prepareDataList;
    }

    public Boolean getOnlyOneVariable() {
        return onlyOneVariable;
    }

    public void setOnlyOneVariable(Boolean onlyOneVariable) {
        this.onlyOneVariable = onlyOneVariable;
    }

庄家钜's avatar
庄家钜 已提交
62 63 64 65 66 67 68 69
    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

庄家钜's avatar
庄家钜 已提交
70 71 72 73 74 75 76 77
    public WriteTemplateAnalysisCellTypeEnum getCellType() {
        return cellType;
    }

    public void setCellType(WriteTemplateAnalysisCellTypeEnum cellType) {
        this.cellType = cellType;
    }

庄家钜's avatar
庄家钜 已提交
78 79
    public Boolean getFirstRow() {
        return firstRow;
庄家钜's avatar
庄家钜 已提交
80 81
    }

庄家钜's avatar
庄家钜 已提交
82 83
    public void setFirstRow(Boolean firstRow) {
        this.firstRow = firstRow;
庄家钜's avatar
庄家钜 已提交
84 85
    }

庄家钜's avatar
庄家钜 已提交
86 87 88 89 90 91 92 93 94 95 96 97 98
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AnalysisCell that = (AnalysisCell)o;
        if (columnIndex != that.columnIndex) {
            return false;
        }
        return rowIndex == that.rowIndex;
庄家钜's avatar
庄家钜 已提交
99 100
    }

庄家钜's avatar
庄家钜 已提交
101 102 103 104 105
    @Override
    public int hashCode() {
        int result = columnIndex;
        result = 31 * result + rowIndex;
        return result;
庄家钜's avatar
庄家钜 已提交
106 107
    }
}