com.github.kunalk16.excel.model.factory.ExcelRow Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lightExcelReader Show documentation
Show all versions of lightExcelReader Show documentation
A lightweight Java framework to read .xlsx excel files.
package com.github.kunalk16.excel.model.factory;
import com.github.kunalk16.excel.factory.extractor.ColumnNameByNumberExtractor;
import com.github.kunalk16.excel.model.user.Cell;
import com.github.kunalk16.excel.model.user.Row;
import java.util.Collection;
import java.util.Map;
public class ExcelRow implements Row {
private final int rowNumber;
private final Map cellByColumn;
public ExcelRow(Map cellByColumn, int rowNumber) {
this.cellByColumn = cellByColumn;
this.rowNumber = rowNumber;
}
@Override
public int getRow() {
return this.rowNumber;
}
@Override
public Collection getCells() {
return this.cellByColumn.values();
}
@Override
public Cell getCellByColumn(String column) {
return this.cellByColumn.get(column);
}
@Override
public Cell getCellByIndex(int index) {
return this.getCellByColumn(ColumnNameByNumberExtractor.getInstance().apply(index));
}
}
|
© 2015 - 2025 Weber Informatics LLC | Privacy Policy