Skip to content

Instantly share code, notes, and snippets.

@krisskross
Created May 18, 2012 17:03
Show Gist options
  • Save krisskross/2726425 to your computer and use it in GitHub Desktop.
Save krisskross/2726425 to your computer and use it in GitHub Desktop.
Predicate<Item> heavyItemPolicy = new Predicate<Item>() {
@Override
public boolean apply(Item item) {
if(item.getWeight() > 1000){
return true;
}
return false;
}
};
Collection<Item> heavyItems = Collections2.filter(order, heavyItemPolicy);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment