class: ArrayedCollection
authorClaus Gittinger <cg@exept.de>
Wed, 09 Jul 2014 17:05:51 +0200
changeset 16711 e0d54bbf5148
parent 16710 ebc7151043f5
child 16712 fe4ba450d073
class: ArrayedCollection added: #newWithSize: - replaces withSize: removed: #withSize:
ArrayedCollection.st
--- a/ArrayedCollection.st	Wed Jul 09 17:05:37 2014 +0200
+++ b/ArrayedCollection.st	Wed Jul 09 17:05:51 2014 +0200
@@ -100,6 +100,22 @@
     "
 !
 
+newWithSize:size
+    "return a new collection of size.
+     For variable size collections, this is different from #new:,
+     in that #new: creates an empty collection with preallocated size,
+     while #withSize: creates a non empty one."
+
+    ^ self new:size.
+
+    "
+     (OrderedCollection new:10)  
+     (OrderedCollection newWithSize:10) 
+     (Array new:10) 
+     (Array newWithSize:10) 
+    "
+!
+
 with:element
     "return a new SequenceableCollection with one element:anObject"
 
@@ -291,22 +307,6 @@
     "
 
     "Modified: 13.4.1996 / 12:14:38 / cg"
-!
-
-withSize:size
-    "return a new collection of size.
-     For variable size collections, this is different from #new:,
-     in that #new: creates an empty collection with preallocated size,
-     while #withSize: creates a non empty one."
-
-    ^ self new:size.
-
-    "
-     (OrderedCollection new:10)  
-     (OrderedCollection withSize:10) 
-     (Array new:10) 
-     (Array withSize:10) 
-    "
 ! !
 
 !ArrayedCollection class methodsFor:'queries'!
@@ -502,6 +502,6 @@
 !ArrayedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.65 2013-12-06 14:40:54 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.66 2014-07-09 15:05:51 cg Exp $'
 ! !