--- a/OrderedDictionary.st Mon Jul 22 07:55:16 2013 +0000
+++ b/OrderedDictionary.st Mon Jul 22 10:25:33 2013 +0200
@@ -204,6 +204,12 @@
"Created: 28.9.1995 / 13:49:39 / stefan"
!
+atIndex:index ifAbsent:aBlock
+ "return an element at a given index"
+
+ ^ self at:(order at:index ifAbsent:[^ aBlock value])
+!
+
atIndex:index put:anAssociation
"put an association to a given index. remove the old associatioan at this index"
|key|
@@ -981,10 +987,10 @@
!OrderedDictionary class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.41 2013-07-01 14:48:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.42 2013-07-22 08:25:33 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.41 2013-07-01 14:48:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/OrderedDictionary.st,v 1.42 2013-07-22 08:25:33 stefan Exp $'
! !