Set.st
changeset 23207 37d3c6400f95
parent 23189 15ea23cfead5
child 23330 0bec0f8e3df9
equal deleted inserted replaced
23206:e291c84f8f11 23207:37d3c6400f95
   536             keyArray basicAt:index put:DeletedEntry.
   536             keyArray basicAt:index put:DeletedEntry.
   537         ].
   537         ].
   538         self possiblyShrink
   538         self possiblyShrink
   539     ].
   539     ].
   540     ^ oldObjectArg
   540     ^ oldObjectArg
       
   541 !
       
   542 
       
   543 replaceAll:oldObject with:newObject
       
   544     "replace all oldObjects by newObject in the receiver."
       
   545 
       
   546     self 
       
   547         remove:oldObject ifAbsent:[];
       
   548         addOrReplace:newObject.
       
   549 
       
   550     "Created: / 13-07-2018 / 12:04:31 / Stefan Vogel"
   541 !
   551 !
   542 
   552 
   543 safeRemove:oldObject 
   553 safeRemove:oldObject 
   544     "remove the element, oldObject from the collection.
   554     "remove the element, oldObject from the collection.
   545      Return the element 
   555      Return the element 
   884 
   894 
   885     "Modified: 1.3.1996 / 21:41:13 / cg"
   895     "Modified: 1.3.1996 / 21:41:13 / cg"
   886 ! !
   896 ! !
   887 
   897 
   888 
   898 
   889 
       
   890 !Set methodsFor:'obsolete set operations'!
   899 !Set methodsFor:'obsolete set operations'!
   891 
   900 
   892 + aCollection
   901 + aCollection
   893     "Kept for backward compatibility. 
   902     "Kept for backward compatibility. 
   894      Use #union: instead, to isolate arithmethic and set operations"
   903      Use #union: instead, to isolate arithmethic and set operations"