DIBits :
My Intelij shows me that I can replace the lambda .filter(bean -> bean != null)
with a method reference. Its is obviuos for me how to do it when I have a Class or an Object with methods. But how to do a reference on != null
, is there a Class that has some kind of isNull()
method?
Ousmane D. :
This is the exact reason why the Objects::nonNull
API exists:
.filter(Objects::nonNull);