KeyedCollection.st
changeset 21732 0fd83e26247f
parent 21655 058cafb6c2f6
child 23338 e2290d3eb871
equal deleted inserted replaced
21731:81d141fee490 21732:0fd83e26247f
   427 ! !
   427 ! !
   428 
   428 
   429 
   429 
   430 !KeyedCollection methodsFor:'removing'!
   430 !KeyedCollection methodsFor:'removing'!
   431 
   431 
       
   432 removeAllKeys:aCollection
       
   433     "remove all keys of the argument, aCollection from the receiver.
       
   434      Raises an error, if some element-to-remove is not in the receiver."
       
   435 
       
   436     aCollection do:[:element | self removeKey:element].
       
   437 
       
   438     "Modified (comment): / 28-04-2017 / 13:36:15 / stefan"
       
   439 !
       
   440 
   432 removeKey:aKey
   441 removeKey:aKey
   433     "remove key (and the value stored under that key) from the
   442     "remove key (and the value stored under that key) from the
   434      receiver; raise an error if no such element is contained"
   443      receiver; raise an error if no such element is contained"
   435 
   444 
   436     ^ self removeKey:aKey ifAbsent:[self errorKeyNotFound:aKey]
   445     ^ self removeKey:aKey ifAbsent:[self errorKeyNotFound:aKey]