Skip to content

Instantly share code, notes, and snippets.

@adrianobrito
Created April 24, 2015 18:48
Show Gist options
  • Save adrianobrito/7d33f78a50c24b5ce7fe to your computer and use it in GitHub Desktop.
Save adrianobrito/7d33f78a50c24b5ce7fe to your computer and use it in GitHub Desktop.
Person List Filtering without Buzz
List<Person> persons = new ArrayList<Person>();
//Add persons to list
...
// Lista que contem as pessoas com mais de 80 Quilos
List<Person> heavyWeightPersons = new ArrayList<Person>();
for(Person person:persons){
if(person.getWeight() > 80)
heavyWeightPersons.add(person);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment