All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.stupdit1t.excel.handle.ObjectHandler Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
package com.github.stupdit1t.excel.handle;

import com.github.stupdit1t.excel.callback.CellCallback;
import com.github.stupdit1t.excel.core.parse.OpsColumn;
import com.github.stupdit1t.excel.handle.rule.BaseVerifyRule;


/**
 * 自定义转换
 *
 * @author 625
 */
public class ObjectHandler extends BaseVerifyRule {

    private CellCallback doHandleSub;

    /**
     * 自定义验证
     *
     * @param allowNull 可为空
     */
    public ObjectHandler(boolean allowNull, OpsColumn opsColumn, CellCallback handle) {
        super(allowNull, opsColumn);
        this.doHandleSub = handle;
    }

    @Override
    protected Object doHandle(int row, int col, Object cellValue) throws Exception {
        return doHandleSub.callback(row, col, cellValue);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy