This is a discussion on Implementation of association class? within the Software Patterns forums, part of the Testing category; Implementation of association class? I'd like some views on best practises for implementing association classes in OOPL code. Regards, // ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Re: Implementation of association class?
Martin R-L wrote:
>I'd like some views on best practises for implementing association classes > in OOPL code. Interestingly Smalltalk already has a class called Association. This has two fields 'key' and 'value'. Associations can be combined to form a Dictionary (a hash-table) which allows you to access the values by the key. If you want bi-directional associations, I would simply add methods for creating and returning the reverse dictionary, possibly with caching if the dictionaries are big. -Panu Viljamaa |
![]() |
| Thread Tools | |
|
|