ArrayedCollection.st
changeset 1414 1bbf1ff2fc31
parent 1289 3abde2c376de
child 1428 2c3e439f08cc
equal deleted inserted replaced
1413:4788a0d3d6e2 1414:1bbf1ff2fc31
   222      onto the argument aStream. Redefined to output index access."
   222      onto the argument aStream. Redefined to output index access."
   223 
   223 
   224     |index "{ Class: SmallInteger }"|
   224     |index "{ Class: SmallInteger }"|
   225 
   225 
   226     thisContext isRecursive ifTrue:[
   226     thisContext isRecursive ifTrue:[
   227 	Transcript showCr:'Error: storeOn: of self referencing collection.'.
   227         Transcript showCR:'Error: storeOn: of self referencing collection.'.
   228 	aStream nextPutAll:'#recursive'.
   228         aStream nextPutAll:'#recursive'.
   229 	^ self
   229         ^ self
   230     ].
   230     ].
   231 
   231 
   232     aStream nextPutAll:'(('; nextPutAll:self class name; nextPutAll:' new:'.
   232     aStream nextPutAll:'(('; nextPutAll:self class name; nextPutAll:' new:'.
   233     self size printOn:aStream.
   233     self size printOn:aStream.
   234     aStream nextPutAll:')'.
   234     aStream nextPutAll:')'.
   235     index := 1.
   235     index := 1.
   236     self do:[:element |
   236     self do:[:element |
   237 	aStream nextPutAll:' at:'. index printOn:aStream. aStream nextPutAll:' put:('.
   237         aStream nextPutAll:' at:'. index printOn:aStream. aStream nextPutAll:' put:('.
   238 	element storeOn:aStream.
   238         element storeOn:aStream.
   239 	aStream nextPutAll:');'.
   239         aStream nextPutAll:');'.
   240 	index := index + 1
   240         index := index + 1
   241     ].
   241     ].
   242     index > 1 ifTrue:[aStream nextPutAll:' yourself'].
   242     index > 1 ifTrue:[aStream nextPutAll:' yourself'].
   243     aStream nextPut:$)
   243     aStream nextPut:$)
   244 
   244 
   245     "
   245     "
   246      (Array with:(1@2) with:(1->2)) storeString    
   246      (Array with:(1@2) with:(1->2)) storeString    
   247     "
   247     "
       
   248 
       
   249     "Modified: 18.5.1996 / 15:37:30 / cg"
   248 ! !
   250 ! !
   249 
   251 
   250 !ArrayedCollection methodsFor:'resizing'!
   252 !ArrayedCollection methodsFor:'resizing'!
   251 
   253 
   252 grow:newSize
   254 grow:newSize
   333 ! !
   335 ! !
   334 
   336 
   335 !ArrayedCollection class methodsFor:'documentation'!
   337 !ArrayedCollection class methodsFor:'documentation'!
   336 
   338 
   337 version
   339 version
   338     ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.35 1996-04-25 16:12:11 cg Exp $'
   340     ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.36 1996-05-18 13:48:40 cg Exp $'
   339 ! !
   341 ! !