Back: ArrayedCollection-streams Up: Base classes Forward: Association class-basic   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.6 Association

Defined in namespace Smalltalk
Superclass: LookupKey
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.

1.6.1 Association class: basic  (class)
1.6.2 Association: accessing  (instance)
1.6.3 Association: finalization  (instance)
1.6.4 Association: printing  (instance)
1.6.5 Association: storing  (instance)
1.6.6 Association: testing  (instance)


1.6.1 Association class: basic

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


1.6.2 Association: accessing

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


1.6.3 Association: finalization

mourn
Finalize the receiver


1.6.4 Association: printing

printOn: aStream
Put on aStream a representation of the receiver


1.6.5 Association: storing

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


1.6.6 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. 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



Back: Association-storing Up: Association Forward: Autoload   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on August, 19 2010 using texi2html