contains method list java with object 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));