ArrayedCollection.st
changeset 7254 c96b2f224aa2
parent 6752 3584b9380c85
child 8893 99996b25482e
equal deleted inserted replaced
7253:471856209f4c 7254:c96b2f224aa2
   271      OrderedCollection withAll:#(1 2 3 4 5)
   271      OrderedCollection withAll:#(1 2 3 4 5)
   272      SortedCollection withAll:#(99 17 53 1 101) 
   272      SortedCollection withAll:#(99 17 53 1 101) 
   273     "
   273     "
   274 
   274 
   275     "Modified: 13.4.1996 / 12:14:38 / cg"
   275     "Modified: 13.4.1996 / 12:14:38 / cg"
       
   276 !
       
   277 
       
   278 withSize:size
       
   279     "return a new collection of size.
       
   280      For variable size collections, this is different from #new:,
       
   281      in that #new: creates an empty collection with preallocated size,
       
   282      while #withSize: creates a non empty one."
       
   283 
       
   284     ^ self new:size.
       
   285 
       
   286     "
       
   287      (OrderedCollection new:10)  
       
   288      (OrderedCollection withSize:10) 
       
   289      (Array new:10) 
       
   290      (Array withSize:10) 
       
   291     "
   276 ! !
   292 ! !
   277 
   293 
   278 !ArrayedCollection class methodsFor:'queries'!
   294 !ArrayedCollection class methodsFor:'queries'!
   279 
   295 
   280 growIsCheap
   296 growIsCheap
   436 ! !
   452 ! !
   437 
   453 
   438 !ArrayedCollection class methodsFor:'documentation'!
   454 !ArrayedCollection class methodsFor:'documentation'!
   439 
   455 
   440 version
   456 version
   441     ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.52 2002-09-10 15:29:35 cg Exp $'
   457     ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.53 2003-05-07 09:48:30 cg Exp $'
   442 ! !
   458 ! !