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 A get(int index) {
synchronized (this) {return list.get(index);}
}
public A set(int index, A element) {
synchronized (this) { beforeChange(); A a = list.set(index, element); change(); ret a; }
}
public void add(int index, A element) {
synchronized (this) { beforeChange(); list.add(index, element);} change();
}
public A remove(int index) {
A e;
synchronized (this) { beforeChange(); 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 extends A> c) {
synchronized (this) { beforeChange(); 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 super A> c) {
synchronized (this) { beforeChange(); list.sort(c);} change();
}