lambda binary snapshots
Ryan Musgrave
ryanm128 at gmail.com
Sat Nov 12 18:23:11 PST 2011
Hi Arul,
The implementation in the Comparators class accepts the woven instance as
the first parameter. Example:
Comparator <Integer> example = ...
Comparator <Integer> someOther Comparator = ...
example.compose ( someOthercomparator);
// Invokes this method:
Comparators.compose(example, someOtherComparator);
At least, that's how I think it works for the user.
~ Ryan
On Nov 13, 2011 8:53 AM, "Arul Dhesiaseelan" <aruld at acm.org> wrote:
> JDK 8 Lambda build is cool. Thanks for making this available!
>
> I was playing with defender methods, wondering what makes this scenario
> work:
>
> In Comparator, there is a new default method compose() which has single
> parameter:
>
> Comparator<T> compose(Comparator<? super T> other) default
> Comparators.compose;
>
> The default implementation in Comparators has two parameters:
>
> public static<T> Comparator<T> compose(Comparator<T> first, Comparator<?
> super T> second) {}
>
> For example, the woven class String.CASE_INSENSITIVE_ORDER
> (CaseInsensitiveComparator.class) has single parameter. I am not sure I
> understand how this works, need help.
>
> -Arul
>
>
More information about the lambda-dev
mailing list