Collection.st
changeset 12636 6f6b3188b285
parent 12593 664991bb352e
child 12653 819c557603e9
--- a/Collection.st	Mon Dec 21 23:46:09 2009 +0100
+++ b/Collection.st	Mon Jan 11 15:49:11 2010 +0100
@@ -228,6 +228,7 @@
     ^ self withSize:n
 ! !
 
+
 !Collection class methodsFor:'Signal constants'!
 
 emptyCollectionSignal
@@ -448,6 +449,7 @@
     ].
 ! !
 
+
 !Collection methodsFor:'accessing'!
 
 anElement
@@ -958,6 +960,14 @@
 
 !
 
+removeAllKeys:aCollection
+    "remove all keys of the argument, aCollection from the receiver.
+     Raises an error, if some element-to-remove is not in the receiver.
+     Notice: only works for keyed collections, such as dictionaries."
+
+    aCollection do:[:element | self removeKey:element].
+!
+
 removeAllSuchThat:aBlock
     "Apply the condition to each element and remove it if the condition is true.  
      Return a collection of removed elements.
@@ -3618,11 +3628,11 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.238 2009-12-07 14:50:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.239 2010-01-11 14:49:11 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.238 2009-12-07 14:50:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.239 2010-01-11 14:49:11 cg Exp $'
 ! !
 
 Collection initialize!