equal
deleted
inserted
replaced
38 same as a Dictionary but key must be identical - not just equal. |
38 same as a Dictionary but key must be identical - not just equal. |
39 Since compare is on identical keys (using ==), hashing is also done via |
39 Since compare is on identical keys (using ==), hashing is also done via |
40 #identityHash instead of #hash. |
40 #identityHash instead of #hash. |
41 IdentityDictionaries are especially useful, when symbols are used as keys. |
41 IdentityDictionaries are especially useful, when symbols are used as keys. |
42 " |
42 " |
43 ! |
|
44 |
|
45 version |
|
46 ^ '$Header: /cvs/stx/stx/libbasic/IdentityDictionary.st,v 1.17 1995-11-23 01:25:21 cg Exp $' |
|
47 ! ! |
43 ! ! |
48 |
44 |
49 !IdentityDictionary methodsFor:'private'! |
45 !IdentityDictionary methodsFor:'private'! |
50 |
46 |
51 compareSame:element1 with:element2 |
47 compareSame:element1 with:element2 |
171 element == anObject ifTrue:[cnt := cnt + 1] |
167 element == anObject ifTrue:[cnt := cnt + 1] |
172 ]. |
168 ]. |
173 ^ cnt |
169 ^ cnt |
174 ! ! |
170 ! ! |
175 |
171 |
|
172 !IdentityDictionary class methodsFor:'documentation'! |
|
173 |
|
174 version |
|
175 ^ '$Header: /cvs/stx/stx/libbasic/IdentityDictionary.st,v 1.18 1995-11-23 17:31:22 cg Exp $' |
|
176 ! ! |