diff --git a/src/main/java/xyz/zhouxy/plusone/validator/PredicateTools.java b/src/main/java/xyz/zhouxy/plusone/validator/PredicateTools.java index 2a06afc..b99e8cb 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/PredicateTools.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/PredicateTools.java @@ -14,8 +14,12 @@ public class PredicateTools { return predicate; } + public static boolean notNull(T obj) { + return obj != null; + } + public static Predicate notNull() { - return obj -> obj != null; + return PredicateTools::notNull; } public static int length(CharSequence cs) {