Collection.st
changeset 23162 0946bcf90682
parent 23058 b532f52a61a6
child 23163 a2f75333efd0
--- a/Collection.st	Sun Jul 01 00:55:43 2018 +0200
+++ b/Collection.st	Sun Jul 01 10:32:42 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
@@ -358,6 +360,7 @@
     ^ self == Collection
 ! !
 
+
 !Collection methodsFor:'Compatibility-ANSI'!
 
 identityIncludes:anObject
@@ -367,6 +370,22 @@
     ^ self includesIdentical:anObject.
 ! !
 
+!Collection methodsFor:'Compatibility-Dolphin'!
+
+includesAllOf:aCollection
+    "same as #includesAll for Squeak/Dolphin compatibility."
+
+    ^ self includesAll:aCollection
+
+    "
+     #(1 2 3 4 5 6 7) includesAllOf:#(1 2 3)
+     #('hello' 'there' 'world') includesAllOf:#('hello' 'world')
+     #(1 2 3 4 5 6 7) includesAllOf:#(7 8 9)
+     #(1 2 3 4 5 6 7) includesAllOf:#(8 9 10)
+    "
+
+    "Created: / 01-07-2018 / 10:31:57 / Claus Gittinger"
+! !
 
 !Collection methodsFor:'Compatibility-Squeak'!
 
@@ -4611,7 +4630,7 @@
     aStream nextPut:$)
 
     "
-     #(1 2 3 'hello' $a $ü) printOn:Transcript
+     #(1 2 3 'hello' $a $ü) printOn:Transcript
      (Array new:100000) printOn:Transcript
      (Array new:100000) printOn:Stdout
      (Array new:100000) printString size
@@ -5970,7 +5989,7 @@
 includesAll:aCollection
     "return true if the receiver includes all elements of
      the argument, aCollection; false if any is missing.
-     Notice: this method has O² runtime behavior and may be
+     Notice: this method has O² runtime behavior and may be
              slow for big receivers/args.
              Think about using a Set, or Dictionary."
 
@@ -5990,7 +6009,7 @@
      Return false if it includes none.
      Uses #= (value compare)
      Notice:
-        this method has O² runtime behavior for some subclasses and may be slow for big receivers/args.
+        this method has O² runtime behavior for some subclasses and may be slow for big receivers/args.
         Think about using a Set or Dictionary.
         Some speedup is also possible, by arranging highly
         probable elements towards the beginning of aCollection, to avoid useless searches.
@@ -6067,7 +6086,7 @@
      Return false if it includes none.
      Use identity compare for comparing.
      Notice:
-        this method has O² runtime behavior for some subclasses and may be slow for big receivers/args.
+        this method has O² runtime behavior for some subclasses and may be slow for big receivers/args.
         Think about using a Set or Dictionary.
         Some speedup is also possible, by arranging highly
         probable elements towards the beginning of aCollection, to avoid useless searches."