The Trunk: Collections-cmm.865.mcz

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

The Trunk: Collections-cmm.865.mcz

commits-2
Chris Muller uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-cmm.865.mcz

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

Name: Collections-cmm.865
Author: cmm
Time: 30 November 2019, 9:33:26.626104 pm
UUID: 8a7c3294-372d-431b-b1f2-1daff3cb3a9e
Ancestors: Collections-mt.864

Let the printString of an OrderedDictionary reveal its key sequence.

=============== Diff against Collections-mt.864 ===============

Item was added:
+ ----- Method: Dictionary>>keysInOrder (in category 'accessing') -----
+ keysInOrder
+ "Answer the keys of the receiver in a particular sequence.  This default is alphabetical, but subclasses like OrderedDictionary maintain their own sequence."
+ ^ self keysSortedSafely!

Item was changed:
  ----- Method: Dictionary>>printElementsOn: (in category 'printing') -----
  printElementsOn: aStream
  aStream nextPut: $(.
  self size > 100
  ifTrue: [aStream nextPutAll: 'size '.
  self size printOn: aStream]
+ ifFalse: [self keysInOrder
- ifFalse: [self keysSortedSafely
  do: [:key | aStream print: key;
  nextPutAll: '->';
  print: (self at: key);
  space]].
  aStream nextPut: $)!

Item was added:
+ ----- Method: OrderedDictionary>>keysInOrder (in category 'accessing') -----
+ keysInOrder
+ "Overridden.  Preserve the order of the receiver."
+ ^ self keys!