Helper classes

Stephen Colebourne scolebourne at
Mon Apr 15 05:22:52 PDT 2013

For reference, in JSR-310 we still have the helper classes, its just
that they are package scoped, with the public API on the interface.

On 15 April 2013 10:55, Maurizio Cimadamore
<maurizio.cimadamore at> wrote:
> I think it sounds sensible - but we are currently experiencing technical
> difficulties in trying out different approaches because of several
> code-generation related issues when lambda and method references are
> mentioned within static interface methods (some of those issues have also
> been reported on this very list). As soon as those issues will be addressed,
> we will have a better understanding of what can and cannot be done.
> Thanks
> Maurizio
> On 15/04/13 09:53, Stephen Colebourne wrote:
>> Currently, Project Lambda has a number of helper clases, notably
>> Collectors and Streams, which are clearly related to the interface.
>> Since JDK8 has static methods on interfaces, are there plans to move
>> the static methods to the interface?
>> This would allow methods such as  intBuilder(), emptyIntStream() and
>> singletonIntStream(int t) to be on IntStream rather than on Stream,
>> and thus have the simpler names of builder(), emptyStream(),
>> singletonStream().
>> Making the change might also affect some method names, as sometimes
>> they read differently, or are otherwise confusing, when on the
>> interface.
>> As a note, on JSR-310, we did move the methods from similar static
>> helper classes to the interfaces:
>> although I'm not sure that counts as precedent yet.
>> Stephen

More information about the lambda-dev mailing list