Added max(), min() and more convenience methods.

Added static methods max() and min(). Also added equals(),
isGreaterThan() and isLessThan() as alternatives to calls to compare().