Remove Setting Method
From CSSEMediaWiki
(Difference between revisions)
Brett Ward (Talk | contribs) (New page: Providing a setting method implies that a field may be changed. If this is not the case, then there should be no method to allow it to be set. The field should also be ''final''. This wil...) |
m (Reverted edits by Ebybymic (Talk); changed back to last version by Brett Ward) |
(One intermediate revision by one user not shown) |
Latest revision as of 03:23, 25 November 2010
Providing a setting method implies that a field may be changed. If this is not the case, then there should be no method to allow it to be set.
The field should also be final. This will make your intentions clear.
This problem may occur if you use Getters and setters to ensure indirect variable access.
See Also