#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Sun, 10 Feb 2019 14:47:30 +0100
changeset 23699 360ee3499a15
parent 23698 3b186751f0f4
child 23700 962839a1b505
#DOCUMENTATION by cg class: Bag category of: #includes: #occurrencesOf:
Bag.st
--- a/Bag.st	Sun Feb 10 14:44:20 2019 +0100
+++ b/Bag.st	Sun Feb 10 14:47:30 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
@@ -527,6 +525,18 @@
 
 !Bag methodsFor:'queries'!
 
+includes:anObject
+    "return true, if anObject is in the receiver"
+
+    ^ (self occurrencesOf:anObject) > 0
+!
+
+occurrencesOf:anObject
+    "return how many times anObject is in the receiver"
+
+    ^ contents at:anObject ifAbsent:0
+!
+
 size
     "return the number of bag elements"
 
@@ -563,12 +573,6 @@
 
 !Bag methodsFor:'testing'!
 
-includes:anObject
-    "return true, if anObject is in the receiver"
-
-    ^ (self occurrencesOf:anObject) > 0
-!
-
 isFixedSize
     "return true if the receiver cannot grow"
 
@@ -581,12 +585,6 @@
      may change due to rehashing, when elements are added/removed"
 
     ^ false
-!
-
-occurrencesOf:anObject
-    "return how many times anObject is in the receiver"
-
-    ^ contents at:anObject ifAbsent:0
 ! !
 
 !Bag class methodsFor:'documentation'!