Mark Vedder wrote:The compareTo method returns one of three distinct values. Use them.
Actually... the API documentation for that method says:
The suggested idiom for performing these comparisons is: (x.compareTo(y) <op> 0), where <op> is one of the six comparison operators.
I would agree that's the most understandable way to write the code.