Skip to content

Instantly share code, notes, and snippets.

@ThanawatMas
Last active May 20, 2018 14:50
Show Gist options
  • Save ThanawatMas/b770bde455e37edcafab87d00d6d1090 to your computer and use it in GitHub Desktop.
Save ThanawatMas/b770bde455e37edcafab87d00d6d1090 to your computer and use it in GitHub Desktop.
ConcurrentModification Experiment
public abstract class ConcurrentModificationProblem implements ConcurrentModificationSolvable {
public final ArrayList<String> experimentData() {
ArrayList<String> roundList = new ArrayList<>();
roundList.add("A");
roundList.add("B");
roundList.add("C");
roundList.add("D");
return roundList;
}
}
public interface ConcurrentModificationSolvable {
void addItemAndReIndex(List<String> roundItem, String newItem);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment