目的是什么
Objects.isNull(x)
如果我们可以简单地写
x == null
?
相同的
Objects.nonNull(...)
和
x != null
从JavaDoc方法:
API注意:此方法已用作Predicate,filter(Objects::isNull)
Predicate
filter(Objects::isNull)