From Effective Java 2/e by Joshua Bloch
- Choose method names carefully
- Don’t go overboard in providing convenience methods
- Avoid long parameter lists
- Break the method up into multiple methods
- Create helper classes to hold groups of parameters
- Combines aspects of the first two is to adapt the Builder pattern
- For parameter types, favor interfaces over classes
- Prefer two-element enum types to boolean parameters
public enum TemperatureScale { FAHRENHEIT, CELSIUS }