Method references with types [Re: lambda syntax tutorial]
Stephen Colebourne
scolebourne at joda.org
Fri Aug 6 03:49:07 PDT 2010
On 6 August 2010 11:25, Peter Levart <peter.levart at marand.si> wrote:
> On 08/06/10, Stephen Colebourne wrote:
>> I'd also note that Foo#bar(...) is acceptable to me, although it feels
>> somewhat pointless.
>
> It is not. For example:
>
> class Foo {
> int bar() { return 0; } // 1st
> int bar(String s) { return s.length(); } // 2nd
> }
>
> // how do I select 1st method if Foo#bar() actualy means Foo#bar(...) ?
Agreed. Foo#bar() implying any method named bar is never going to fly.
My "pointless" comment was contrasting Foo#bar(...) to Foo#bar(String,Integer).
Stephen
More information about the lambda-dev
mailing list