MethodDictionary.st
branchjv
changeset 17845 7e0cfaac936d
parent 17761 b0e5971141bc
child 17846 24edc476ac18
--- a/MethodDictionary.st	Thu Jun 23 16:55:10 2011 +0100
+++ b/MethodDictionary.st	Thu Jul 07 23:08:07 2011 +0100
@@ -9,6 +9,7 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
+
 "{ Package: 'stx:libbasic' }"
 
 KeyedCollection variableSubclass:#MethodDictionary
@@ -215,51 +216,6 @@
     "Modified: 23.1.1997 / 14:00:03 / cg"
 !
 
-at:key putOrAppend:value allowDuplicates: allowDuplicates
-    "set the value for a given key, which is supposed to be a symbol.
-     In contrast to dictionaries, we allow adding elements only, if there is an
-     empty slot (nil key) present.
-     Otherwise a new MethodDictionary is created & returned"
-
-    |slot emptySlot newDict sz "{ Class: SmallInteger }"|
-
-    sz := self basicSize.
-    1 to:sz by:2 do:[:i |
-        slot := self basicAt:i.
-        (allowDuplicates not and:[slot == key]) ifTrue:[
-            self basicAt:(i + 1) put:value .
-            ^ self.
-        ].
-        slot isNil ifTrue:[
-            emptySlot := i.
-        ]
-    ].
-
-    emptySlot notNil ifTrue:[
-        self basicAt:emptySlot       put:key.
-        self basicAt:(emptySlot + 1) put:value.
-        ^ self.
-    ].
-
-    "/ not enough room for new entry, copy to new dictionary
-    newDict := self class new:sz//2+1.
-
-"/ cannot do this ...
-"/    newDict replaceFrom:1 to:sz with:self startingAt:1.
-"/ must use basicAt
-    1 to:sz do:[:i |
-        newDict basicAt:i put:(self basicAt:i).
-    ].
-
-    newDict basicAt:(sz+1) put:key.
-    newDict basicAt:(sz+2) put:value.
-    ^ newDict.
-
-    "Modified: / 07-06-1996 / 17:32:40 / stefan"
-    "Modified: / 23-01-1997 / 14:00:03 / cg"
-    "Created: / 26-04-2010 / 16:28:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
 keyAtValue:value ifAbsent:exceptionBlock
     "return the first key with value - 
      return result of exceptionBlock if no key can be found"
@@ -421,9 +377,5 @@
 !MethodDictionary class methodsFor:'documentation'!
 
 version
-    ^ '$Id: MethodDictionary.st 10517 2010-04-26 18:26:38Z vranyj1 $'
-!
-
-version_SVN
-    ^ '$Id: MethodDictionary.st 10517 2010-04-26 18:26:38Z vranyj1 $'
-! !
+    ^ '$Id: MethodDictionary.st 10656 2011-07-07 22:08:07Z vranyj1 $'
+! !
\ No newline at end of file