The Trunk: Collections-nice.263.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-nice.263.mcz

commits-2
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.263.mcz

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

Name: Collections-nice.263
Author: nice
Time: 26 December 2009, 1:36:40 am
UUID: 3afe82da-f0d8-46aa-b18e-647262d69692
Ancestors: Collections-nice.262

remove Dictionary>>#occurrencesOf: because same as super

=============== Diff against Collections-nice.262 ===============

Item was changed:
  ----- Method: Dictionary>>unreferencedKeys (in category 'removing') -----
  unreferencedKeys
  "TextConstants unreferencedKeys"
 
- | n |
  ^'Scanning for references . . .'
  displayProgressAt: Sensor cursorPoint
  from: 0
  to: self size
  during:
  [:bar |
+ | n |
  n := 0.
  self keys select:
  [:key |
  bar value: (n := n + 1).
  (self systemNavigation allCallsOn: (self associationAt: key)) isEmpty]]!

Item was changed:
  ----- Method: Dictionary>>associationDeclareAt: (in category 'accessing') -----
  associationDeclareAt: aKey
  "Return an existing association, or create and return a new one.  Needed as a single message by ImageSegment.prepareToBeSaved."
 
- | existing |
  ^ self associationAt: aKey ifAbsent: [
+ | existing |
  (Undeclared includesKey: aKey)
  ifTrue:
  [existing := Undeclared associationAt: aKey.
  Undeclared removeKey: aKey.
  self add: existing]
  ifFalse:
  [self add: aKey -> false]]!

Item was removed:
- ----- Method: Dictionary>>occurrencesOf: (in category 'testing') -----
- occurrencesOf: anObject
- "Answer how many of the receiver's elements are equal to anObject."
-
- | count |
- count := 0.
- self do: [:each | anObject = each ifTrue: [count := count + 1]].
- ^count!