|
|
6.5 Association
- Defined in namespace Smalltalk
- Category: Language-Data types
- 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.
6.5.1 Association class: basic
- key: aKey value: aValue
- Answer a new association with the given key and value
6.5.2 Association: accessing
- 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
6.5.3 Association: printing
- printOn: aStream
- Put on aStream a representation of the receiver
6.5.4 Association: storing
- storeOn: aStream
- Put on aStream some Smalltalk code compiling to the receiver
6.5.5 Association: testing
- = anAssociation
- Answer whether the association's key and value are the same as anAssociation's, or false if anAssociation is not an Association
- hash
- Answer an hash value for the receiver
|