--- a/ArrayedCollection.st Tue May 06 20:27:25 2003 +0200
+++ b/ArrayedCollection.st Wed May 07 11:48:30 2003 +0200
@@ -273,6 +273,22 @@
"
"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'!
@@ -438,5 +454,5 @@
!ArrayedCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.52 2002-09-10 15:29:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.53 2003-05-07 09:48:30 cg Exp $'
! !