--- a/Collection.st Thu Mar 16 13:36:12 2017 +0100
+++ b/Collection.st Thu Mar 16 16:49:46 2017 +0100
@@ -14,11 +14,11 @@
"{ NameSpace: Smalltalk }"
Object subclass:#Collection
- instanceVariableNames:''
- classVariableNames:'EmptyCollectionSignal InvalidKeySignal NotEnoughElementsSignal
- ValueNotFoundSignal'
- poolDictionaries:''
- category:'Collections-Abstract'
+ instanceVariableNames:''
+ classVariableNames:'EmptyCollectionSignal InvalidKeySignal NotEnoughElementsSignal
+ ValueNotFoundSignal'
+ poolDictionaries:''
+ category:'Collections-Abstract'
!
!Collection class methodsFor:'documentation'!
@@ -1445,9 +1445,10 @@
!
testAndAdd:anElement
- "add the argument, anObject to the receiver.
+ "Test, if the element is present in the receiver.
Answer true, if the element did already exist in the collection,
false otherwise.
+ If the element does not exist, add it to the collection.
WARNING: do not add elements while iterating over the receiver.
Iterate over a copy to do this."
@@ -1459,6 +1460,7 @@
^ false.
"Created: / 16-02-2017 / 13:41:58 / stefan"
+ "Modified (comment): / 16-03-2017 / 16:48:06 / stefan"
! !
!Collection methodsFor:'bulk operations'!