Skip to content

Instantly share code, notes, and snippets.

@rcx
Created August 15, 2016 02:59
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 rcx/21a835ebcc811d3198e0255e1299fd94 to your computer and use it in GitHub Desktop.
Save rcx/21a835ebcc811d3198e0255e1299fd94 to your computer and use it in GitHub Desktop.
// What is the problem with this implementation of List#addAll? Assume add() is implemented properly.
@Override
public boolean addAll(Collection<? extends Statement> c) {
boolean ret = false;
for (Statement s : c)
ret = ret || add(s);
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment