!include #1001196 // Lisp static class SList { new L data; // don't access this from outside // these are ok to access (but not change) from outside final S id = randomID(8); final L history = synchroList(); public synchronized void add(S a) { data.add(a); history.add(lisp("add", a)); } public synchronized void clear() { data.clear(); history.add(lisp("clear")); } public synchronized void remove(int i) { data.remove(i); history.add(lisp("remove", "" + i)); } public synchronized void remove(S s) { int i = data.indexOf(s); if (i >= 0) remove(i); } public synchronized int indexOf(S s) { return data.indexOf(s); } public synchronized S get(int i) { return data.get(i); } public S getID() { return id; } public synchronized int size() { return data.size(); } }