|
|
6.180 WeakValueLookupTable
- Defined in namespace Smalltalk
- Category: Collections-Weak
I am similar to a plain LookupTable, but my values are stored
in a weak array; I track which of the values are garbage collected and,
as soon as one of them is accessed, I swiftly remove the associations
for the garbage collected values
6.180.1 WeakValueLookupTable: hacks
- at: key ifAbsent: aBlock
- Answer the value associated to the given key, or the result of evaluating aBlock if the key is not found
- at: key ifPresent: aBlock
- If aKey is absent, answer nil. Else, evaluate aBlock passing the associated value and answer the result of the invocation
- includesKey: key
- Answer whether the receiver contains the given key.
6.180.2 WeakValueLookupTable: rehashing
- rehash
- Rehash the receiver
|