1 TwoWayIdentityDictionary : Collection
9 add { arg anAssociation;
10 this.put(anAssociation.key, anAssociation.value);
13 idToObj.put(key, obj);
14 objToID.put(obj, key);
19 key = this.getID(obj);
20 idToObj.removeAt(key);
21 objToID.removeAt(obj);
25 var obj = this.at(key);
26 idToObj.removeAt(key);
27 objToID.removeAt(obj);
31 ^idToObj.do(function);
43 idToObj = IdentityDictionary.new;
44 objToID = IdentityDictionary.new;
50 *initClass { id = 1000; }
51 *next { ^id = id + 1; }
54 ObjectTable : TwoWayIdentityDictionary
64 this.put(UniqueID.next, obj);
86 *objPerform { arg id, selector ... args;
90 obj.performList(selector, args);