--- 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'!