Collection.st
changeset 10092 70a5cb4e5df0
parent 9919 dd9d3f24c6d0
child 10504 0869e0f9b3cb
--- a/Collection.st	Fri Oct 13 13:04:26 2006 +0200
+++ b/Collection.st	Fri Oct 13 13:04:40 2006 +0200
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libbasic' }"
 
 Object subclass:#Collection
@@ -2294,6 +2293,7 @@
     ^ self size max:2
 ! !
 
+
 !Collection methodsFor:'printing & storing'!
 
 displayString
@@ -2934,19 +2934,18 @@
     "return true, if the the receiver includes all elements of
      the argument, aCollection; false if any is missing.
      Notice: this method has O-square runtime behavior and may be
-             slow for big receivers/args. Think about using a Set,
-             or Dictionary."
-
-    aCollection do:[:element |
-        (self includes:element) ifFalse:[^ false].
-    ].
-    ^ true
+             slow for big receivers/args. 
+             Think about using a Set, or Dictionary."
+
+    ^ aCollection conform:[:element | (self includes:element)]
 
     "
      #(1 2 3 4 5 6 7) includesAll:#(1 2 3)
      #('hello' 'there' 'world') includesAll:#('hello' 'world')
      #(1 2 3 4 5 6 7) includesAll:#(7 8 9)
     "
+
+    "Modified: / 13-10-2006 / 12:54:50 / cg"
 !
 
 includesAny:aCollection
@@ -3131,7 +3130,7 @@
 !Collection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.196 2006-09-18 09:05:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.197 2006-10-13 11:04:40 cg Exp $'
 ! !
 
 Collection initialize!