Bag.st
changeset 22308 d6552a1b2fb9
parent 20628 8679e14fa67d
child 23699 360ee3499a15
--- a/Bag.st	Tue Oct 10 18:05:47 2017 +0200
+++ b/Bag.st	Tue Oct 10 18:06:26 2017 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
@@ -113,6 +115,14 @@
      Elements will be compared using equality compare (i.e. #= not #== identity)."
 
     ^ self equalityNew:size
+!
+
+newWithCapacity:size
+    "return a new empty Collection with capacity for n elements."
+
+    ^ self new:size
+
+    "Created: / 10-10-2017 / 17:49:15 / stefan"
 ! !
 
 !Bag methodsFor:'Compatibility-Dolphin'!