Comparators.comparing overloads

Richard Warburton richard.warburton at
Sun Jul 21 11:34:31 PDT 2013


In many places in the Streams API the methods utilising primitive
specialised functions have been renamed in order to avoid overload
resolution issues, eg mapToInt etc.  This doesn't appear to have happened
to the Comparator.comparing static method, or the thenComparing default
methods on Comparator instances.  Is there a reason for this, or is it just
a case of not having had time to effect such a change?

Here is the most trivial example which results in overload resolution

Comparators.comparing(x -> 0);


  Dr. Richard Warburton
  @RichardWarburto <>

More information about the lambda-dev mailing list