Comparator interface.
See: Description
Comparator for
Boolean objects that can sort either true or false first.
Comparator that compares
Comparable objects.
compare method.
Comparator interface.
You may also consider using ComparatorUtils, which is a single class that uses static methods to construct instances of the classes in this package.