Back: ArrayedCollection-storing
Up: Class reference
Forward: Association class-basic
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

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  (class)
6.5.2 Association: accessing  (instance)
6.5.3 Association: printing  (instance)
6.5.4 Association: storing  (instance)
6.5.5 Association: testing  (instance)


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




This document was generated on May, 12 2002 using texi2html