@@ -0,0 +1,1562 @@
+package me.nallar.collections;%0D%0A%0D%0Aimport java.util.ArrayList;%0D%0Aimport java.util.Iterator;%0D%0Aimport java.util.LinkedHashSet;%0D%0A%0D%0Aimport me.nallar.tickthreading.Log;%0D%0A%0D%0Apublic class ArrayListTempSetNoClear%3CT%3E extends ArrayList%3CT%3E %7B%0D%0A%09private boolean iterating = false;%0D%0A%09private final LinkedHashSet%3CT%3E toAdd = new LinkedHashSet%3CT%3E();%0D%0A%09private final LinkedHashSet%3CObject%3E toRemove = new LinkedHashSet%3CObject%3E();%0D%0A%0D%0A%09@Override%0D%0A%09public synchronized boolean add(final T t) %7B%0D%0A%09%09if (iterating) %7B%0D%0A%09%09%09boolean contains = super.contains(t);%0D%0A%09%09%09return (toRemove.remove(t) && contains) %7C%7C (!contains && toAdd.add(t));%0D%0A%09%09%7D%0D%0A%09%09return super.add(t);%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public synchronized boolean remove(final Object o) %7B%0D%0A%09%09if (iterating) %7B%0D%0A%09%09%09return super.contains(o) && toRemove.add(o) %7C%7C toAdd.remove(o);%0D%0A%09%09%7D%0D%0A%09%09return super.remove(o);%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public synchronized boolean contains(final Object o) %7B%0D%0A%09%09return iterating ? super.contains(o) && !toRemove.contains(o) %7C%7C toAdd.contains(o) : super.contains(o);%0D%0A%09%7D%0D%0A%0D%0A%09@Override%0D%0A%09public int size() %7B%0D%0A%09%09return iterating ? super.size() + toAdd.size() - toRemove.size() : super.size();%0D%0A%09%7D%0D%0A%0D%0A%09public synchronized Iterator%3CT%3E startIteration() %7B%0D%0A%09%09if (iterating) %7B%0D%0A%09%09%09Log.severe(%22Started iterating when not previously done%22, new Throwable());%0D%0A%09%09%09done();%0D%0A%09%09%7D%0D%0A%09%09iterating = true;%0D%0A%09%09return super.iterator();%0D%0A%09%7D%0D%0A%0D%0A%09public synchronized void done() %7B%0D%0A%09%09if (!iterating) %7B%0D%0A%09%09%09return;%0D%0A%09%09%7D%0D%0A%09%09iterating = false;%0D%0A%09%09super.addAll(toAdd);%0D%0A%09%09super.removeAll(toRemove);%0D%0A%09%09toAdd.clear();%0D%0A%09%09toRemove.clear();%0D%0A%09%7D%0D%0A%7D%0D%0A

Add missing class, fix #635