Back: WeakValueIdentityDictionary Up: Base classes Forward: WeakValueLookupTable class-hacks   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.214 WeakValueLookupTable

Defined in namespace Smalltalk
Superclass: LookupTable
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

1.214.1 WeakValueLookupTable class: hacks  (class)
1.214.2 WeakValueLookupTable: hacks  (instance)
1.214.3 WeakValueLookupTable: rehashing  (instance)


1.214.1 WeakValueLookupTable class: hacks

primNew: realSize
Answer a new, uninitialized instance of the receiver with the given size


1.214.2 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.


1.214.3 WeakValueLookupTable: rehashing

rehash
Rehash the receiver



Back: WeakValueLookupTable-hacks Up: WeakValueLookupTable Forward: WordArray   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on May, 22 2008 using texi2html