Package org.aoju.bus.office.excel.sax
Class AbstractRowHandler<T>
java.lang.Object
org.aoju.bus.office.excel.sax.AbstractRowHandler<T>
- Type Parameters:
T- 转换后的数据类型
- All Implemented Interfaces:
RowHandler
- Direct Known Subclasses:
BeanRowHandler,MapRowHandler
抽象行数据处理器,通过实现
handle(int, long, List) 处理原始数据
并调用handleData(int, long, Object)处理经过转换后的数据。- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
FieldsModifier and TypeFieldDescription行数据转换函数protected final int读取结束行(包含,从0开始计数)protected final int读取起始行(包含,从0开始计数) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid处理一行数据abstract voidhandleData(int sheetIndex, long rowIndex, T data) 处理转换后的数据Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aoju.bus.office.excel.sax.RowHandler
doAfterAllAnalysed, handleCell
-
Field Details
-
startRowIndex
protected final int startRowIndex读取起始行(包含,从0开始计数) -
endRowIndex
protected final int endRowIndex读取结束行(包含,从0开始计数) -
convertFunc
行数据转换函数
-
-
Constructor Details
-
AbstractRowHandler
public AbstractRowHandler(int startRowIndex, int endRowIndex) 构造- Parameters:
startRowIndex- 读取起始行(包含,从0开始计数)endRowIndex- 读取结束行(包含,从0开始计数)
-
-
Method Details
-
handle
Description copied from interface:RowHandler处理一行数据- Specified by:
handlein interfaceRowHandler- Parameters:
sheetIndex- 当前Sheet序号rowIndex- 当前行号,从0开始计数rowCells- 行数据,每个Object表示一个单元格的值
-
handleData
处理转换后的数据- Parameters:
sheetIndex- 当前Sheet序号rowIndex- 当前行号,从0开始计数data- 行数据
-