What is the purpose of
Objects.isNull(x)
if we can simply write
x == null
?
Same for
Objects.nonNull(...)
and
x != null
From the JavaDoc of the method:
API Note: This method exists to be used as a Predicate, filter(Objects::isNull)
Predicate
filter(Objects::isNull)
1.4m articles
1.4m replys
5 comments
56.9k users