public abstract class BaseVerifyRule<T,R> extends AbsParent<OpsColumn<R>>
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
allowNull
是否可为空
|
protected T |
defaultValue
默认值
|
private static org.apache.logging.log4j.Logger |
LOG |
protected boolean |
trim
是否去空格
|
| 构造器和说明 |
|---|
BaseVerifyRule(boolean allowNull,
OpsColumn<R> parent)
构建校验规则
|
| 限定符和类型 | 方法和说明 |
|---|---|
BaseVerifyRule<T,R> |
defaultValue(T defaultValue)
去除两边空格
|
abstract T |
doHandle(int row,
int col,
Object cellValue)
校验单元格值
|
T |
handle(int row,
int col,
Object cellValue)
校验单元格值
|
Object |
handleNull(Object value)
判空处理
|
BaseVerifyRule<T,R> |
notNull()
不能为空
|
BaseVerifyRule<T,R> |
trim()
去除两边空格
|
private static final org.apache.logging.log4j.Logger LOG
protected boolean allowNull
protected boolean trim
protected T defaultValue
public Object handleNull(Object value) throws PoiException
value - 列值PoiExceptionpublic T handle(int row, int col, Object cellValue) throws Exception
cellValue - 列值Exceptionpublic BaseVerifyRule<T,R> notNull()
public BaseVerifyRule<T,R> trim()
public BaseVerifyRule<T,R> defaultValue(T defaultValue)
Copyright © 2023. All rights reserved.