Is there a way using streams to return the property of a bean or null if the bean isn't present?
Something like:
String property = beans.stream()
.filter(bean -> bean.getId() == id).findFirst().orElse(null).beanProperty();
Is there a way using streams to return the property of a bean or null if the bean isn't present?
Something like:
String property = beans.stream()
.filter(bean -> bean.getId() == id).findFirst().orElse(null).beanProperty();