Is there any shorter way to say this:
final Comparator<ClassA> byName =
(final ClassA a1, final ClassA a2)
-> a1.getName().compareTo( a2.getName() ));
I know that getName() will never return null.
Perhaps something along these lines using a method reference:
final Comparator<ClassA> byName = ????( ClassA::getName );