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

org.chobit.commons.funcs.Checker Maven / Gradle / Ivy

There is a newer version: 0.1.3.4
Show newest version
package org.chobit.commons.funcs;


import static org.chobit.commons.utils.StrKit.isNotBlank;

/**
 * 目标校验函数,通常用于对集合对象中单个元素的校验
 *
 * @author robin
 */
public interface Checker {


    /**
     * 对目标值执行校验
     *
     * @param value 目标值
     * @return 校验结果
     */
    boolean check(T value);


    /**
     * 默认字符串校验工具类
     * 

* 仅用来判断字符串是否为空 */ class StringDefault implements Checker { @Override public boolean check(String value) { return isNotBlank(value); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy