Remove Setting Method
From CSSEMediaWiki
(Difference between revisions)
m (Reverted edits by Ebybymic (Talk); changed back to last version by Brett Ward) |
|||
Line 5: | Line 5: | ||
This problem may occur if you use [[Getters and setters]] to ensure indirect variable access. | This problem may occur if you use [[Getters and setters]] to ensure indirect variable access. | ||
− | + | == See Also == | |
{{Refactoring}} | {{Refactoring}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
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