Class NullStrategy

java.lang.Object
org.aoju.bus.validate.strategy.NullStrategy
All Implemented Interfaces:
Matcher<Object,Null>, Validator<Object>

public class NullStrategy extends Object implements Validator<Object>, Matcher<Object,Null>
NULL校验
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • NullStrategy

      public NullStrategy()
  • Method Details

    • on

      public boolean on(Object object, Context context)
      Description copied from interface: Validator
      校验对象
      Specified by:
      on in interface Validator<Object>
      Parameters:
      object - 被校验的对象
      context - 当前校验参数的上下文
      Returns:
      校验结果, true:校验通过
    • on

      public boolean on(Object object, Null annotation, Context context)
      Description copied from interface: Matcher
      校验对象
      Specified by:
      on in interface Matcher<Object,Null>
      Parameters:
      object - 被校验的对象
      annotation - 被校验对象的注解
      context - 校验环境上下文
      Returns:
      校验结果, true:校验通过