Back: HashedCollection-testing collections Up: Base classes Forward: HomedAssociation class-basic   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.87 HomedAssociation

Defined in namespace Smalltalk
Superclass: Association
Category: Language-Data types
My instances represent know about their parent namespace, which is of use when implementing weak collections and finalizations.

1.87.1 HomedAssociation class: basic  (class)
1.87.2 HomedAssociation: accessing  (instance)
1.87.3 HomedAssociation: finalization  (instance)
1.87.4 HomedAssociation: storing  (instance)


1.87.1 HomedAssociation class: basic

key: aKey value: aValue environment: aNamespace
Answer a new association with the given key and value


1.87.2 HomedAssociation: accessing

environment
Answer the namespace in which I live.

environment: aNamespace
Set the namespace in which I live to be aNamespace.


1.87.3 HomedAssociation: finalization

mourn
This message is sent to the receiver when the object is made ephemeron (which is common when HomedAssociations are used by a WeakKeyDictionary or a WeakSet). The mourning of the object's key is first of all demanded to the environment (which will likely remove the object from itself), and then performed as usual by clearing the key and value fields.


1.87.4 HomedAssociation: storing

storeOn: aStream
Put on aStream some Smalltalk code compiling to the receiver



Back: HomedAssociation-finalization Up: HomedAssociation Forward: IdentityDictionary   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on February, 22 2012 using texi2html