java check if object with properties exists in list of objects code example
Example: java list contains object with property
boolean found = list.stream()
.anyMatch(p -> p.name.equals(personName));
boolean found = list.stream()
.anyMatch(p -> p.name.equals(personName));