Comparators<T> extension

Provides functions for working with Comparators.

on

Methods

and(Comparator<T> tiebreaker) Comparator<T>
Returns a Comparator that uses tiebreaker to break ties.
reverse() Comparator<T>
Reverses the ordering of this Comparator.

Static Methods

by<T>(Select<T, Comparable<Object>> select) Comparator<T>
Returns a Comparator that compares two Ts using the values produced by select.