public boolean equals(Object o) { if (this == o) return true; synchronized (this) {return list.equals(o);} } public int hashCode() { synchronized (this) {return list.hashCode();} } public E get(int index) { synchronized (this) {return list.get(index);} } public E set(int index, E element) { synchronized (this) {return list.set(index, element);} } public void add(int index, E element) { synchronized (this) {list.add(index, element);} change(); } public E remove(int index) { E e; synchronized (this) { e = list.remove(index); } change(); ret e; } public int indexOf(Object o) { synchronized (this) {return list.indexOf(o);} } public int lastIndexOf(Object o) { synchronized (this) {return list.lastIndexOf(o);} } public boolean addAll(int index, Collection c) { synchronized (this) {if (!list.addAll(index, c)) false;} change(); true; } public ListIterator listIterator() { return list.listIterator(); // doesn't implement all methods } public ListIterator listIterator(int index) { return list.listIterator(index); // doesn't implement all methods } /*public void replaceAll(UnaryOperator operator) { synchronized (this) {list.replaceAll(operator);} }*/ public void sort(Comparator c) { synchronized (this) {list.sort(c);} change(); }