...
The implementor must ensure sgn(x.compareTo(y)) == -sgn(y.compareTo (x))
for all x and y. (This implies that x.compareTo(y)
must throw an exception iff y.compareTo(x)
throws an exception.)
The implementor must also ensure that the relation is transitive: (x.compareTo >0 && y.compareTo(z)>0)
implies x.compareTo(z)>0
.
...