public int compareTo (Double anotherDouble)

Compares two Double objects numerically. There are two ways in which comparisons performed by this method differ from those performed by the Java language numerical comparison operators ( <, <=, ==, >=, >) when applied to primitive double values:

This ensures that the natural ordering of Double objects imposed by this method is consistent with equals.

anotherDouble    the Double to be compared.

Returns:  the value 0 if anotherDouble is numerically equal to this Double; a value less than 0 if this Double is numerically less than anotherDouble; and a value greater than 0 if this Double is numerically greater than anotherDouble.

Since:  1.2