#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Mon, 21 May 2018 09:27:59 +0200
changeset 22977 6069c5ca7b34
parent 22976 ff8f2476519a
child 22978 589f146aebcd
#BUGFIX by cg class: Dictionary added: #keyAtIdenticalValue: #keyAtIdenticalValue:ifAbsent:
Dictionary.st
--- a/Dictionary.st	Sun May 20 15:56:16 2018 +0200
+++ b/Dictionary.st	Mon May 21 09:27:59 2018 +0200
@@ -767,6 +767,30 @@
     "/ NOT REACHED
 !
 
+keyAtIdenticalValue:aValue
+    "for protocol compatibility only:
+     return the key whose value is identical (i.e. using #== for compare)
+     to the argument, nil if none found.
+     This is a slow access, since there is no fast reverse mapping.
+     NOTICE:
+        The value is searched using identity compare;
+        use #keyAtEqualValue: to compare for equality."
+
+    ^ self keyAtIdentityValue:aValue
+!
+
+keyAtIdenticalValue:aValue ifAbsent:exceptionBlock
+    "for protocol compatibility only:
+     return the key whose value is identical (i.e. using #== for compare)
+     to the argument, nil if none found.
+     This is a slow access, since there is no fast reverse mapping.
+     NOTICE:
+        The value is searched using identity compare;
+        use #keyAtEqualValue: to compare for equality."
+
+    ^ self keyAtIdentityValue:aValue ifAbsent:exceptionBlock
+!
+
 keyAtIdentityValue:aValue
     "return the key whose value is identical (i.e. using #== for compare)
      to the argument, nil if none found.