3 HashedCollection classMethod!
5 ^ self new: self defaultCapacity!
7 HashedCollection classMethod!
9 ^ self basicNew initialize: initialCapacity!
11 HashedCollection classMethod!
13 ^ self new: self defaultCapacity!
15 HashedCollection method!
16 at: index include: anObject
19 array at: index put: anObject.
26 HashedCollection method!
28 array at: index put: array.
30 deleted := deleted + 1!
33 HashedCollection method!
35 ^ self find: anObject in: array!
37 HashedCollection method!
38 find: anObject in: anArray
39 self subclassResponsibility!
41 HashedCollection method!
45 newArray := Array new: (array size + array size).
48 newArray at: (self find: object in: newArray) put: object].
54 HashedCollection method!
56 "maximum 50% load factor"
57 (self occupiedCount * 2) > array size
58 ifTrue: [ self grow ]!
61 HashedCollection method!
65 HashedCollection method!
71 HashedCollection method!
75 object := array at: i.
76 (object ~~ nil) & (object ~~ array) ifTrue: [ aBlock value: object ]]!
81 HashedCollection classMethod!
85 HashedCollection classMethod!
89 HashedCollection method!
90 sizeForCapacity: capacity
93 minsize := HashedCollection minimumCapacity.
95 [ minsize < capacity ]
96 whileTrue: [ minsize := minsize + minsize ].
100 HashedCollection method!
104 HashedCollection method!
105 initialize: initialCapacity
106 array := Array new: (self sizeForCapacity: initialCapacity).
110 HashedCollection method!
112 ^ self occupiedCount / array size!