Comparator and Comparators

Brian Goetz brian.goetz at
Mon Jun 24 07:48:55 PDT 2013

For this issue, Comparators will be going away soon as a public class, 
and its members sent to various places:
  - Comparator for common comparator factories
  - BinaryOperator for Comparator-to-BinaryOperator transforms
  - Map.Entry for specialized comparators on Map.Entry

You can see this in lambda repo if you're interested.

In general, people who want to believe "I can put static methods in 
interfaces now, so code that used to go in class Foos now belongs in 
interface Foo" will be disappointed (if they're smart).

The set of methods that are acceptable in a "statics dumping ground" 
class Foos are not necessarily the same set as would be appropriate in 
the Foo interface.  Judgment and taste is required.

On 6/24/2013 10:36 AM, Boaz Nahum wrote:
> Hi
> Now we have two places to look for factory methods:
> Comparator
> Comparators
> What is the rule ?
> Stream factories are in Stream,
> Collection factories are in Collections  (nothing we can do about it)
> Collector are in Collectors
> function.* are in function.*
> I know it is not big issue.
> Thank
> Boaz

More information about the lambda-dev mailing list