Skip to content

Instantly share code, notes, and snippets.

@iyengarajay
Last active May 20, 2016 13:03
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 iyengarajay/e1cc8f40ea9f746d93adba1aa1f745c1 to your computer and use it in GitHub Desktop.
Save iyengarajay/e1cc8f40ea9f746d93adba1aa1f745c1 to your computer and use it in GitHub Desktop.
private static List<Person> getAllWomenUSA(List<Person> persons)
{
List<Person> womenUSA = new ArrayList<>();
for(Person person : persons)
{
if(person.getGender() == Gender.FEMALE && person.getCitizenship() == Citizenship.USA)
{
womenUSA.add(person);
}
}
return womenUSA;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment