--- a/WeakIdentityDictionary.st Fri Nov 18 16:04:04 2016 +0100
+++ b/WeakIdentityDictionary.st Fri Nov 18 16:05:23 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
@@ -67,6 +69,26 @@
"
! !
+!WeakIdentityDictionary methodsFor:'acessing'!
+
+keys
+ "return a collection containing all valid keys of the receiver"
+
+ |keySet|
+
+ keySet := self emptyCollectionForKeys.
+ keyArray validElementsDo:[:key |
+ (key notNil and:[key ~~ DeletedEntry]) ifTrue:[
+ key == NilEntry ifTrue:[
+ keySet add:nil.
+ ] ifFalse:[
+ keySet add:key.
+ ]
+ ]
+ ].
+ ^ keySet
+! !
+
!WeakIdentityDictionary methodsFor:'adding & removing'!
at:key ifAbsent:exceptionBlock