sclass SynchronizedSet extends SynchronizedCollection implements Set { *() {} // for persistence *(Set set) { super(set); } *(Set set, O mutex) { super(set, mutex); } public boolean equals(Object o) { if (this == o) return true; synchronized (this) {return c.equals(o);} } public int hashCode() { synchronized (this) {return c.hashCode();} } }