Principle
- Choose method names carefully.
- Don't go overboard in providing convenience methods.
-
Avoid long parameter lists.
- Break the method up into multiple methods. Such as sublist element of List interface.
- Create helper classes to hold groups of parameters.
- Adapt the builder pattern form object construction to method invocation. See item 2.
- For parameter types, favor interfaces over classes.
-
Prefer two-element enum types to boolean parameters.
public enum TemperatureScale { FAHRENHEIT, CELSIUS }