Dictionary.st
changeset 24502 af543de49215
parent 24408 5a0a248e33e6
child 24620 9a36839ff573
equal deleted inserted replaced
24501:73e59c4255d9 24502:af543de49215
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 1991 by Claus Gittinger
     2  COPYRIGHT (c) 1991 by Claus Gittinger
     5 	      All Rights Reserved
     3 	      All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
   880                 keySet add:key
   878                 keySet add:key
   881             ]
   879             ]
   882         ]
   880         ]
   883     ].
   881     ].
   884     ^ keySet
   882     ^ keySet
       
   883 !
       
   884 
       
   885 newAt:key put:value
       
   886     "For compatibility with SmallDictionaryWithNElements.
       
   887      Same operation as at:put:, 
       
   888      with the possibiliy of returning a new instance if there was a need to grow"
       
   889 
       
   890     self at:key put:value.
       
   891     ^ self
   885 ! !
   892 ! !
   886 
   893 
   887 !Dictionary methodsFor:'adding & removing'!
   894 !Dictionary methodsFor:'adding & removing'!
   888 
   895 
   889 add:anAssociation
   896 add:anAssociation
  2247         xor:(Dictionary withKeysAndValues:#(1 'uno'  4 'quatro' 5 'cinque'))
  2254         xor:(Dictionary withKeysAndValues:#(1 'uno'  4 'quatro' 5 'cinque'))
  2248     "
  2255     "
  2249 
  2256 
  2250     "Created: / 20-01-2017 / 19:43:48 / stefan"
  2257     "Created: / 20-01-2017 / 19:43:48 / stefan"
  2251 ! !
  2258 ! !
  2252 
       
  2253 
  2259 
  2254 
  2260 
  2255 !Dictionary methodsFor:'printing & storing'!
  2261 !Dictionary methodsFor:'printing & storing'!
  2256 
  2262 
  2257 printElementsDo:aBlock
  2263 printElementsDo:aBlock