mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-02 20:02:49 +08:00
fix comment
This commit is contained in:
parent
e73b2605a4
commit
668e96f07d
@ -16,6 +16,7 @@ public class ExcelExtractorUtil {
|
||||
/**
|
||||
* 获取 {@link ExcelExtractor} 对象
|
||||
*
|
||||
* @param wb {@link Workbook}
|
||||
* @return {@link ExcelExtractor}
|
||||
*/
|
||||
public static ExcelExtractor getExtractor(Workbook wb) {
|
||||
@ -32,7 +33,7 @@ public class ExcelExtractorUtil {
|
||||
* 读取为文本格式<br>
|
||||
* 使用{@link ExcelExtractor} 提取Excel内容
|
||||
*
|
||||
* @param wb {@link Workbook}
|
||||
* @param wb {@link Workbook}
|
||||
* @param withSheetName 是否附带sheet名
|
||||
* @return Excel文本
|
||||
* @since 4.1.0
|
||||
|
@ -130,9 +130,9 @@ public abstract class AbstractSheetReader<T> implements SheetReader<T> {
|
||||
/**
|
||||
* 读取某一行数据
|
||||
*
|
||||
* @param sheet {@link Sheet}
|
||||
* @param rowIndex 行号,从0开始
|
||||
* @return 一行数据
|
||||
* @since 4.0.3
|
||||
*/
|
||||
protected List<Object> readRow(Sheet sheet, int rowIndex) {
|
||||
return RowUtil.readRow(sheet.getRow(rowIndex), this.cellEditor);
|
||||
|
@ -15,13 +15,15 @@ import java.util.List;
|
||||
*/
|
||||
public class ListSheetReader extends AbstractSheetReader<List<List<Object>>> {
|
||||
|
||||
/** 是否首行作为标题行转换别名 */
|
||||
private final boolean aliasFirstLine;
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @param startRowIndex 起始行(包含,从0开始计数)
|
||||
* @param endRowIndex 结束行(包含,从0开始计数)
|
||||
* @param startRowIndex 起始行(包含,从0开始计数)
|
||||
* @param endRowIndex 结束行(包含,从0开始计数)
|
||||
* @param aliasFirstLine 是否首行作为标题行转换别名
|
||||
*/
|
||||
public ListSheetReader(int startRowIndex, int endRowIndex, boolean aliasFirstLine) {
|
||||
super(startRowIndex, endRowIndex);
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||
* @author looly
|
||||
* @since 5.4.4
|
||||
*/
|
||||
public abstract class BeanRowHandler<T> extends AbstractRowHandler<T>{
|
||||
public abstract class BeanRowHandler<T> extends AbstractRowHandler<T> {
|
||||
|
||||
/**
|
||||
* 标题所在行(从0开始计数)
|
||||
@ -30,14 +30,15 @@ public abstract class BeanRowHandler<T> extends AbstractRowHandler<T>{
|
||||
* 构造
|
||||
*
|
||||
* @param headerRowIndex 标题所在行(从0开始计数)
|
||||
* @param startRowIndex 读取起始行(包含,从0开始计数)
|
||||
* @param endRowIndex 读取结束行(包含,从0开始计数)
|
||||
* @param startRowIndex 读取起始行(包含,从0开始计数)
|
||||
* @param endRowIndex 读取结束行(包含,从0开始计数)
|
||||
* @param clazz Bean类型
|
||||
*/
|
||||
public BeanRowHandler(int headerRowIndex, int startRowIndex, int endRowIndex, Class<T> clazz){
|
||||
public BeanRowHandler(int headerRowIndex, int startRowIndex, int endRowIndex, Class<T> clazz) {
|
||||
super(startRowIndex, endRowIndex);
|
||||
Assert.isTrue(headerRowIndex <= startRowIndex, "Header row must before the start row!");
|
||||
this.headerRowIndex = headerRowIndex;
|
||||
this.convertFunc = (rowList)-> BeanUtil.toBean(IterUtil.toMap(headerList, rowList), clazz);
|
||||
this.convertFunc = (rowList) -> BeanUtil.toBean(IterUtil.toMap(headerList, rowList), clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user