Replacing anonymous Comparator implementation with Java 8 lambda.