Collection.st
changeset 14317 cdf4c073a6bc
parent 14313 6c0e007e10af
child 14325 ea62a55e60c0
equal deleted inserted replaced
14316:cba356d31725 14317:cdf4c073a6bc
   257      Kludges around the stupid definition of OrderedCollection>>new:"
   257      Kludges around the stupid definition of OrderedCollection>>new:"
   258 
   258 
   259     ^ self withSize:n
   259     ^ self withSize:n
   260 ! !
   260 ! !
   261 
   261 
   262 
       
   263 !Collection class methodsFor:'Signal constants'!
   262 !Collection class methodsFor:'Signal constants'!
   264 
   263 
   265 emptyCollectionSignal
   264 emptyCollectionSignal
   266     "return the signal used to report non-allowed operation on empty collections"
   265     "return the signal used to report non-allowed operation on empty collections"
   267 
   266 
   493 
   492 
   494     ^ self keysAndValuesDo:[:key :index |
   493     ^ self keysAndValuesDo:[:key :index |
   495         aTwoArgBlock value:index value:key
   494         aTwoArgBlock value:index value:key
   496     ].
   495     ].
   497 ! !
   496 ! !
   498 
       
   499 
   497 
   500 !Collection methodsFor:'accessing'!
   498 !Collection methodsFor:'accessing'!
   501 
   499 
   502 anElement
   500 anElement
   503     "return any element from the collection, 
   501     "return any element from the collection, 
  1526 !
  1524 !
  1527 
  1525 
  1528 asSet
  1526 asSet
  1529     "return a new Set with the receiver collections elements"
  1527     "return a new Set with the receiver collections elements"
  1530 
  1528 
  1531     ^ self addAllNonNilElementsTo:(Set new:self size)
  1529     ^ self addAllTo:(Set new:self size)
  1532 !
  1530 !
  1533 
  1531 
  1534 asSharedCollection
  1532 asSharedCollection
  1535     "return a shared collection on the receiver.
  1533     "return a shared collection on the receiver.
  1536      This implements synchronized access to me."
  1534      This implements synchronized access to me."
  4373 ! !
  4371 ! !
  4374 
  4372 
  4375 !Collection class methodsFor:'documentation'!
  4373 !Collection class methodsFor:'documentation'!
  4376 
  4374 
  4377 version
  4375 version
  4378     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.279 2012-08-13 13:29:14 stefan Exp $'
  4376     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.280 2012-08-13 16:46:26 stefan Exp $'
  4379 !
  4377 !
  4380 
  4378 
  4381 version_CVS
  4379 version_CVS
  4382     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.279 2012-08-13 13:29:14 stefan Exp $'
  4380     ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.280 2012-08-13 16:46:26 stefan Exp $'
  4383 ! !
  4381 ! !
  4384 
  4382 
  4385 Collection initialize!
  4383 Collection initialize!