class: ArrayedCollection
added: #newWithSize: - replaces withSize:
removed: #withSize:
--- 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 $'
! !