Dictionary.st
branchjv
changeset 19478 1f5aa87f6170
parent 19281 4d70a3cb95ee
parent 19468 0164eb8f7c28
child 19559 d35a89d5c0ec
equal deleted inserted replaced
19477:af82888ceb72 19478:1f5aa87f6170
   290         ifFalse: [ ^false ]
   290         ifFalse: [ ^false ]
   291     ].
   291     ].
   292     ^ true
   292     ^ true
   293 ! !
   293 ! !
   294 
   294 
   295 
       
   296 !Dictionary methodsFor:'accessing'!
   295 !Dictionary methodsFor:'accessing'!
   297 
   296 
   298 associationAt:aKey
   297 associationAt:aKey
   299     "return an association consisting of aKey and the element indexed
   298     "return an association consisting of aKey and the element indexed
   300      by aKey -
   299      by aKey -
   319     ].
   318     ].
   320     ^ exceptionBlock value
   319     ^ exceptionBlock value
   321 !
   320 !
   322 
   321 
   323 associations
   322 associations
   324     "return an ordered collection containing the receivers associations."
   323     "return an ordered collection containing the receiver's associations."
   325 
   324 
   326     |coll|
   325     |coll|
   327 
   326 
   328     coll := OrderedCollection new:(keyArray size).
   327     coll := OrderedCollection new:(keyArray size).
   329     self associationsDo:[:assoc | coll add:assoc].
   328     self associationsDo:[:assoc | coll add:assoc].
  2328     "dispatch for visitor pattern; send #visitDictionary:with: to aVisitor"
  2327     "dispatch for visitor pattern; send #visitDictionary:with: to aVisitor"
  2329 
  2328 
  2330     ^ aVisitor visitDictionary:self with:aParameter
  2329     ^ aVisitor visitDictionary:self with:aParameter
  2331 ! !
  2330 ! !
  2332 
  2331 
  2333 
       
  2334 !Dictionary class methodsFor:'documentation'!
  2332 !Dictionary class methodsFor:'documentation'!
  2335 
  2333 
  2336 version
  2334 version
  2337     ^ '$Header$'
  2335     ^ '$Header$'
  2338 !
  2336 !