The Inbox: Collections-cmm.366.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Collections-cmm.366.mcz

commits-2
A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-cmm.366.mcz

==================== Summary ====================

Name: Collections-cmm.366
Author: cmm
Time: 20 June 2010, 10:32:07.913 pm
UUID: c7dfc514-8ea0-492c-b953-748f89eda70d
Ancestors: Collections-ul.365

Integrated Brent Pinkney's object-concatenation enhancement.  This extends the Object API to allow easy object concatenation, just as Exceptions may be easily concatenated with the #, (comma) selector, now any object may, as well:

  object1, object2  --> "{ object1.  object2 }"

and, equally, with other collections:

  { object1.  object2 }, object3 --> "{ object1.  object2. object3 }"


=============== Diff against Collections-ul.365 ===============

Item was added:
+ ----- Method: Object>>asArray (in category '*collections-concatenation') -----
+ asArray
+
+ ^ Array with: self
+
+ !

Item was changed:
  ----- Method: Collection>>, (in category 'copying') -----
  , aCollection
+
+ ^ self copy addAll: aCollection asCollection; yourself!
- ^self copy addAll: aCollection; yourself!

Item was added:
+ ----- Method: Object>>asCollection (in category '*collections-concatenation') -----
+ asCollection
+
+ ^ self asArray!

Item was added:
+ ----- Method: Object>>, (in category '*collections-concatenation') -----
+ , anObjectOrCollection
+
+ ^ self asArray, anObjectOrCollection asCollection!

Item was added:
+ ----- Method: Collection>>asCollection (in category 'converting') -----
+ asCollection
+
+ ^ self!

Item was changed:
  ----- Method: SequenceableCollection>>, (in category 'copying') -----
  , otherCollection
  "Concatenate two Strings or Collections."
 
  ^ self copyReplaceFrom: self size + 1
   to: self size
+  with: otherCollection asCollection
-  with: otherCollection
  "
  #(2 4 6 8) , #(who do we appreciate)
+ ((2989 printStringBase: 16) copyFrom: 4 to: 6) , ' boy!!'
- ((2989 storeStringBase: 16) copyFrom: 4 to: 6) , ' boy!!'
  "!