com.github.rrsunhome.excelsql.parser.RowDefinition Maven / Gradle / Ivy
package com.github.rrsunhome.excelsql.parser;
import lombok.ToString;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @author : wangqijia
* create at: 2021/10/26 下午4:52
*/
@ToString
public class RowDefinition {
private int rowIndex;
private List cellDefinitions = new ArrayList<>();
public RowDefinition() {
}
public RowDefinition(int rowIndex) {
this.rowIndex = rowIndex;
}
public RowDefinition(List cellDefinitions) {
this.cellDefinitions = cellDefinitions;
}
public List getCellDefinitions() {
return Collections.unmodifiableList(cellDefinitions);
}
public void addCellDefinition(int cellIndex, String cellValue) {
cellDefinitions.add(new CellDefinition(cellIndex, cellValue));
}
public int getRowIndex() {
return rowIndex;
}
public int getCellSize() {
return cellDefinitions.size();
}
}