AnalysisCell.java 2.1 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 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

    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
庄家钜 已提交
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
    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;
    }

    public WriteTemplateAnalysisCellTypeEnum getCellType() {
        return cellType;
    }

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

    @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
庄家钜 已提交
81 82
    }

庄家钜's avatar
庄家钜 已提交
83 84 85 86 87
    @Override
    public int hashCode() {
        int result = columnIndex;
        result = 31 * result + rowIndex;
        return result;
庄家钜's avatar
庄家钜 已提交
88 89
    }
}