--- a/SharedCollection.st Sun Nov 21 12:06:39 2010 +0100
+++ b/SharedCollection.st Mon Nov 22 21:09:26 2010 +0100
@@ -15,7 +15,7 @@
instanceVariableNames:'accessLock realCollection'
classVariableNames:''
poolDictionaries:''
- category:'Collections-Unordered'
+ category:'Collections-Support'
!
!SharedCollection class methodsFor:'documentation'!
@@ -120,6 +120,17 @@
^ rslt
!
+do:aBlock
+ |rslt|
+
+ accessLock critical:[
+ rslt := realCollection do:aBlock
+ ].
+ ^ rslt
+
+ "Created: / 22-11-2010 / 21:01:21 / cg"
+!
+
doesNotUnderstand:aMessage
"catches everything not understood by the collection protocol"
@@ -134,6 +145,50 @@
"Modified: / 07-12-2006 / 17:38:30 / cg"
!
+isEmpty
+ |rslt|
+
+ accessLock critical:[
+ rslt := realCollection isEmpty
+ ].
+ ^ rslt
+
+ "Created: / 22-11-2010 / 20:59:01 / cg"
+!
+
+notEmpty
+ |rslt|
+
+ accessLock critical:[
+ rslt := realCollection notEmpty
+ ].
+ ^ rslt
+
+ "Created: / 22-11-2010 / 20:59:06 / cg"
+!
+
+removeAllSuchThat:aBlock
+ |rslt|
+
+ accessLock critical:[
+ rslt := realCollection removeAllSuchThat:aBlock
+ ].
+ ^ rslt
+
+ "Created: / 22-11-2010 / 20:59:27 / cg"
+!
+
+removeIdentical:someElement ifAbsent:aBlock
+ |rslt|
+
+ accessLock critical:[
+ rslt := realCollection removeIdentical:someElement ifAbsent:aBlock
+ ].
+ ^ rslt
+
+ "Created: / 22-11-2010 / 21:00:33 / cg"
+!
+
size
|rslt|
@@ -166,5 +221,9 @@
!SharedCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/SharedCollection.st,v 1.7 2008-02-11 14:33:18 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/SharedCollection.st,v 1.8 2010-11-22 20:09:26 cg Exp $'
+!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libbasic2/SharedCollection.st,v 1.8 2010-11-22 20:09:26 cg Exp $'
! !