Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
core-1.2.0
-
None
Description
Although not required, it is highly advisable that if two objects a and b are equal (a.equals(b) == true), then if their type implements Comparable then a.compareTo(b) == 0.
Conversely, if a.equals(b) == false, then a.compareTo(b) != 0, and a.compareTo(b) = -b.compareTo(a)