--- a/Dictionary.st Fri Jul 20 14:47:39 2012 +0200
+++ b/Dictionary.st Fri Jul 20 14:54:17 2012 +0200
@@ -1471,44 +1471,6 @@
"Modified: 20.4.1996 / 11:32:11 / cg"
!
-keysAndValuesCollect:aBlock
- "for each key-value pair in the receiver, evaluate the argument, aBlock
- and return a collection with the results.
-
- See also:
- #associationsCollect: (which passes keys->value pairs)
- #collect: (which only passes values)
-
- This is much like #associationsCollect:, but aBlock gets the
- key and value as two separate arguments.
- #associationsCollect: is a bit slower.
-
- WARNING: do not add/remove elements while iterating over the receiver.
- Iterate over a copy to do this."
-
- |newCollection|
-
- newCollection := OrderedCollection new.
- self keysAndValuesDo:[:key :value |
- newCollection add:(aBlock value:key value:value)
- ].
- ^ newCollection
-
- "
- |ages|
-
- ages := Dictionary new.
- ages at:'cg' put:37.
- ages at:'ca' put:33.
- ages at:'sv' put:36.
- ages at:'tk' put:28.
- ages keysAndValuesCollect:[:name :age |
- name , '''s age is ' , age printString]
- "
-
- "Modified: 20.4.1996 / 11:33:50 / cg"
-!
-
keysAndValuesDo:aTwoArgBlock
"evaluate the argument, aBlock for every element in the collection,
passing both key and element as arguments.
@@ -2099,11 +2061,11 @@
!Dictionary class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.104 2011-09-23 12:07:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.105 2012-07-20 12:54:17 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.104 2011-09-23 12:07:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Dictionary.st,v 1.105 2012-07-20 12:54:17 cg Exp $'
! !
Dictionary initialize!