java list contains object with property

Java
boolean found = list.stream()
              .anyMatch(p -> p.name.equals(personName));
Source

Also in Java: