RunArray.st
changeset 4805 6e49b5b5f8c3
parent 4776 7259a694e36d
child 4921 e5f2b1b5a28d
--- a/RunArray.st	Sun Feb 10 14:51:26 2019 +0100
+++ b/RunArray.st	Sun Feb 10 14:51:30 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  This class is not covered by or part of the ST/X licence.
 
@@ -1255,6 +1253,50 @@
 
 !RunArray methodsFor:'queries'!
 
+includes:anElement
+    "return true, if the receiver includes an element which is equal
+     to the argument, anElement; false otherwise.
+     Redefined to prevent the inherited loop over individual accesses via #at:,
+     which would be very inefficient."
+
+    contentsArray notNil ifTrue:[
+        contentsArray pairWiseDo:[:len :val |
+            (anElement = val) ifTrue:[
+                ^ true
+            ].
+        ].
+    ].
+    ^ false
+
+    "Modified: / 14.5.1996 / 15:54:45 / cg"
+    "Created: / 30.10.1997 / 15:38:02 / cg"
+!
+
+includesIdentical:anElement
+    "return true, if the receiver includes the argument, anElement; false otherwise.
+     Redefined to prevent the inherited loop over individual accesses via #at:,
+     which would be very inefficient."
+
+    contentsArray notNil ifTrue:[
+        contentsArray pairWiseDo:[:len :val |
+            (anElement == val) ifTrue:[
+                ^ true
+            ].
+        ].
+    ].
+    ^ false
+
+    "Created: / 30.10.1997 / 15:38:30 / cg"
+!
+
+isEmpty
+    "Am I empty or not. Returns a boolean"
+
+    ^ contentsArray size == 0
+
+    "Modified: 11.5.1996 / 13:35:17 / cg"
+!
+
 size
     "Answer how many elements the receiver contains.
      This is not the number of runs (but the simulated number of elements)."
@@ -1374,52 +1416,6 @@
     "Modified: / 30.10.1997 / 15:33:29 / cg"
 ! !
 
-!RunArray methodsFor:'testing'!
-
-includes:anElement
-    "return true, if the receiver includes an element which is equal
-     to the argument, anElement; false otherwise.
-     Redefined to prevent the inherited loop over individual accesses via #at:,
-     which would be very inefficient."
-
-    contentsArray notNil ifTrue:[
-        contentsArray pairWiseDo:[:len :val |
-            (anElement = val) ifTrue:[
-                ^ true
-            ].
-        ].
-    ].
-    ^ false
-
-    "Modified: / 14.5.1996 / 15:54:45 / cg"
-    "Created: / 30.10.1997 / 15:38:02 / cg"
-!
-
-includesIdentical:anElement
-    "return true, if the receiver includes the argument, anElement; false otherwise.
-     Redefined to prevent the inherited loop over individual accesses via #at:,
-     which would be very inefficient."
-
-    contentsArray notNil ifTrue:[
-        contentsArray pairWiseDo:[:len :val |
-            (anElement == val) ifTrue:[
-                ^ true
-            ].
-        ].
-    ].
-    ^ false
-
-    "Created: / 30.10.1997 / 15:38:30 / cg"
-!
-
-isEmpty
-    "Am I empty or not. Returns a boolean"
-
-    ^ contentsArray size == 0
-
-    "Modified: 11.5.1996 / 13:35:17 / cg"
-! !
-
 !RunArray class methodsFor:'documentation'!
 
 version