java check if list contains element with property 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));