添加判空方法。
parent
5cad71ed34
commit
e4f18d5d89
|
@ -14,8 +14,12 @@ public class PredicateTools {
|
||||||
return predicate;
|
return predicate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static <T> boolean notNull(T obj) {
|
||||||
|
return obj != null;
|
||||||
|
}
|
||||||
|
|
||||||
public static <T> Predicate<T> notNull() {
|
public static <T> Predicate<T> notNull() {
|
||||||
return obj -> obj != null;
|
return PredicateTools::notNull;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int length(CharSequence cs) {
|
public static int length(CharSequence cs) {
|
||||||
|
|
Loading…
Reference in New Issue