Skip to content

Instantly share code, notes, and snippets.

@iyengarajay
Last active May 20, 2016
Embed
What would you like to do?
private List<Person> getPeopleWithFilter(List<Person> persons, Predicate<Person> filter)
{
List<Person> people = new ArrayList<>();
for(Person person : persons){
if(filter.test(person) {
people.add(person);
}
}
return people;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment