Category: Language-Data types
Superclass: LookupKey
My instances represent a mapping between two objects. Typically, my "key" object is a symbol, but I don't require this. My "value" object has no conventions associated with it; it can be any object at all.

Method category index

basic (class)
accessing (instance)
finalization (instance)
printing (instance)
storing (instance)
testing (instance)

basic (class)

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

top


accessing (instance)

environment
Answer nil. This is present to achieve polymorphism with instances of VariableBinding.

environment: aNamespace

Do nothing. This is present to achieve polymorphism with instances of VariableBinding.

key: aKey value: aValue

Set the association's key to aKey, and its value to aValue

value

Answer the association's value

value: aValue

Set the association's value to aValue

top


finalization (instance)

mourn
Finalize the receiver

top


printing (instance)

printOn: aStream
Put on aStream a representation of the receiver

top


storing (instance)

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

top


testing (instance)

= anAssociation
Answer whether the association's key and value are the same as anAssociation's, or false if anAssociation is not an Association. As a special case, identical values are considered equal even if #= returns false (as is the case for NaN floating-point values).

hash

Answer an hash value for the receiver

top