Last active
May 20, 2016 13:03
-
-
Save iyengarajay/fb0a402d74aac906de7660092d7f373e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<Person> getAllPersonByGenderAndCitizenhip(List<Person> persons, Gender gender, Citizenship citizenship) | |
{ | |
List<Person> people = new ArrayList<>(); | |
for(Person person : persons) | |
{ | |
if(person.getGender() == gender && person.getCitizenship() == citizenship) | |
{ | |
people.add(person); | |
} | |
} | |
return people; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment