Last active
May 20, 2018 14:50
-
-
Save ThanawatMas/b770bde455e37edcafab87d00d6d1090 to your computer and use it in GitHub Desktop.
ConcurrentModification Experiment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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