#DOCUMENTATION by stefan
authorStefan Vogel <sv@exept.de>
Thu, 16 Mar 2017 16:49:46 +0100
changeset 21650 61639cef6166
parent 21649 4a09b7965b34
child 21651 e55ca15b7c8d
#DOCUMENTATION by stefan class: Collection comment/format in: #testAndAdd:
Collection.st
--- 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'!