Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Predicate<Person> p1 = p -> p.getAge() > 20;
Predicate<Person> p2 = p -> p.getAge() < 30;
Predicate<Person> p3 = p -> p.getGender().equals("male");
Predicate<Person> p = p1.and(p2).and(p3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment