static class DerivedSet extends AbstractSet {
Set base;
Set additions = new HashSet;
*() {}
*(Set *base) {}
*(Set *base, Set *additions) {}
public int size() { ret base.size()+additions.size(); }
public Iterator iterator() { fail(); }
public bool contains(O o) { ret base.contains(o) || additions.contains(o); }
public bool add(A a) {
ret !base.contains(a) && additions.add(a);
}
// does not remove from base set, only from additions
public bool remove(O o) { ret additions.remove(o); }
O mutex() { ret collectionMutex(additions); }
}