Association
An Association represents a binary relation between two objects, called the key and the value.
Note:
Technically, the semantics of the magnitude comparing operations are different for Associations, because the messages <, <=, >, and >= are defined in terms of the key only, while the = message is defined in terms of both the key and the value. This means, for example, that <= is not the "logical or" of < and =. Despite this, Association has been grouped with the magnitude classes because that is where it is traditionally implemented in the Smalltalk environment.
Accessing
key, key:, key:value:, value, value:
Porting tip:
Both VA Smalltalk and Objectworks\Smalltalk define the = message in terms of both the key and the value. Smalltalk/V defines = in terms of the key only. Smalltalk/V does not provide the message key:value:.
Creating instances (Association class)
key:value:
Creating instances (Object)
->
Porting tip:
Although not included in the Blue Book, this convenience method is provided by most other Smalltalk implementations.
Last modified date: 04/20/2020