Product Site

5.4.5.1. Comparator Class

The Comparator class is the base class for implementing Comparator objects that can be used with the sortWith or stableSortWith methods. The compare method implements some form of comparison that determines the relative ordering of two objects. Many Comparator implementations are specific to particular object types.

It is defined as a MIXIN class.
Table 5.33. Comparator Class
Object
Methods inherited from the Object class
Class (Metaclass)
Methods inherited from the Class class
Comparator (Mixin Class)
compare