OrderedDictionary.st
changeset 15534 808593c7efb3
parent 15451 8be26a61d680
child 15662 e87729351c27
equal deleted inserted replaced
15533:221ecc3b193e 15534:808593c7efb3
   202     ^ self at:(order at:index)
   202     ^ self at:(order at:index)
   203 
   203 
   204     "Created: 28.9.1995 / 13:49:39 / stefan"
   204     "Created: 28.9.1995 / 13:49:39 / stefan"
   205 !
   205 !
   206 
   206 
       
   207 atIndex:index ifAbsent:aBlock
       
   208     "return an element at a given index"
       
   209 
       
   210     ^ self at:(order at:index ifAbsent:[^ aBlock value])
       
   211 !
       
   212 
   207 atIndex:index put:anAssociation
   213 atIndex:index put:anAssociation
   208     "put an association to a given index. remove the old associatioan at this index"
   214     "put an association to a given index. remove the old associatioan at this index"
   209     |key|
   215     |key|
   210 
   216 
   211     key := anAssociation key.
   217     key := anAssociation key.
   979 ! !
   985 ! !
   980 
   986 
   981 !OrderedDictionary class methodsFor:'documentation'!
   987 !OrderedDictionary class methodsFor:'documentation'!
   982 
   988 
   983 version
   989 version
   984     ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.41 2013-07-01 14:48:19 cg Exp $'
   990     ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.42 2013-07-22 08:25:33 stefan Exp $'
   985 !
   991 !
   986 
   992 
   987 version_CVS
   993 version_CVS
   988     ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.41 2013-07-01 14:48:19 cg Exp $'
   994     ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.42 2013-07-22 08:25:33 stefan Exp $'
   989 ! !
   995 ! !
   990 
   996