Change Unidirectional Association to Bidirectional
From CSSEMediaWiki
(Difference between revisions)
Brett Ward (Talk | contribs) (Page Outline Added) |
|||
Line 1: | Line 1: | ||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://yzobiwysac.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]= | ||
+ | ---- | ||
+ | =[http://yzobiwysac.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> | ||
If you have two classes that need to use each other's features, but the link currently goes one way, change the association to bidirectional to allow needed navigation. | If you have two classes that need to use each other's features, but the link currently goes one way, change the association to bidirectional to allow needed navigation. | ||
Revision as of 07:10, 24 November 2010
If you have two classes that need to use each other's features, but the link currently goes one way, change the association to bidirectional to allow needed navigation.
This refactoring uses back pointers to implement the needed bidirectionality. This pointer will be added as a field. Decisions will also need to be made on which class controls the association, with the non-controlling side needing a helper method. The existing modifier will need to be altered or added to the controlling side to update the back pointers.
See Also: