Use "sort key" in a sentence

1. The Comparator.Comparing static function accepts a sort key Function and returns a Comparator for the type which contains the sort key:

2. But, as we strip away the boilerplate, we realize that the idiom used for extracting the sort key — here, the last name — is in itself somewhat convoluted.

3. Static <T,U extends Comparable<? super U>> Comparator<T> Comparing( Function<? super T,? extends U> keyExtractor) To see this in action, let's use the name field in Employee as the sort key and pass its method reference as an argument of type …