Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created December 16, 2015 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeaholicguy/9961ac202364c959a476 to your computer and use it in GitHub Desktop.
Save codeaholicguy/9961ac202364c959a476 to your computer and use it in GitHub Desktop.
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