String comparator as a lambda
You can also chain the Comparators using thenComparing

CASE_INSENSITIVE_COMPARATOR = Comparator.comparing((Function&lt;String, String&gt;) String::toLowerCase)
                                        .thenComparing(o -&gt; o);


Official Java docs on thenComparing.