Product SiteDocumentation Site

5.4.10.2. compare


>>-compare(first,second)--------------------------------><

This method returns "1" if the second is larger than first object, "0" if the two objects are equal, and "-1" second is smaller than first, resulting in a descending sort sequence. The DescendingComparator assumes the first object implements the Comparable compareTo method (Section 5.4.4.2, “compareTo”.