An Alternative to Boolean Parameters

I'm always uneasy when I see boolean parameters, particularly in a public method signature.  I think they're a minefield for misunderstanding because they're so information poor.  Really, it's one bit of information, which is good for computers but terrible for people.  Until recently, I've always thought in terms of creating two methods for each boolean parameter.  Sometimes this is good but sometimes not really.

Yesterday, I came across a suggestion in Effective Java (2nd Ed.) that I like: use Java 5 enums instead of booleans. Two advantages

  1. the enum values can be made much more readable than true or false
  2. the values can be extended if there are more than two scenarios in future