--- a/KeyedCollection.st Tue Aug 08 14:22:03 2006 +0200
+++ b/KeyedCollection.st Tue Aug 08 16:14:00 2006 +0200
@@ -147,6 +147,19 @@
"Created: / 19.6.1998 / 00:56:24 / cg"
!
+findFirstKey:aBlock
+ "find and return the first key, for which evaluation of the argument, aBlock
+ returns true; return nil if none is detected."
+
+ self keysDo:[:key |
+ (aBlock value:key) ifTrue:[^ key].
+ ].
+ ^ nil
+
+ "Created: 8.10.1996 / 22:01:31 / cg"
+ "Modified: 8.10.1996 / 22:02:03 / cg"
+!
+
keysAndValuesDo:aBlock
"evaluate aBlock for each key and value"
@@ -199,5 +212,5 @@
!KeyedCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/KeyedCollection.st,v 1.2 2005-06-27 10:24:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/KeyedCollection.st,v 1.3 2006-08-08 14:14:00 cg Exp $'
! !