Create a gist now

Instantly share code, notes, and snippets.

for (Iterator<SomeItem> it = items.iterator(); it.hasNext();) {
SomeItem item = it.next();
if (item.value < discardBelowValue) {
it.remove();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment