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

me.excel.tools.validator.row.CommonRowValidator Maven / Gradle / Ivy

The newest version!
package me.excel.tools.validator.row;


import me.excel.tools.model.excel.ExcelRow;

import java.util.function.Function;

/**
 * customer row validator
 * 

* Created by hanwen on 4/26/16. */ public class CommonRowValidator extends RowValidatorAdapter { private Function validateResultGetter; public CommonRowValidator(Function validateResultGetter, String errorMessage, String[] messageOnFields) { super(errorMessage, messageOnFields); this.validateResultGetter = validateResultGetter; } public CommonRowValidator(Function validateResultGetter, String[] messageOnFields) { super(null, messageOnFields); this.validateResultGetter = validateResultGetter; } @Override protected boolean customValidate(ExcelRow excelRow) { if (validateResultGetter == null) { return true; } return validateResultGetter.apply(excelRow); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy