Setter and Getter Methods for Shapes (Part 2 - Existing Methods)

Having determined that we're going to add standard JavaBean getters to the shape classes but not add setters, the question remains what to do with the few existing getter methods. I vote for removing them for a number of reasons:

  • consistency - always a good thing in an API - we should have setters on all or none;

  • principle of least surprise - the behaviour of the existing methods is inconsistent: some of them update the geometry data and some do not, some of them have this fact documented and some do not