Hi, for me this is more readable than current naming. Comparator<People> cmp1 = compareWith(People::getFirstName). thenCompareWith(People::getLastName);
Ali Ebrahimi On Thu, Mar 7, 2013 at 12:22 AM, Henry Jen <henry....@oracle.com> wrote: > On 03/06/2013 03:28 AM, Ali Ebrahimi wrote: > > Hi, > > just one suggestion: > > > > rename comparing with compareWith > > > > There was a round of discussion on naming. > > > http://mail.openjdk.java.net/pipermail/lambda-libs-spec-observers/2012-November/000446.html > > I have my personal preference among proposals, but EG seems to have come > to a consensus on this. > > I don't feel strongly between thenCompare, thenComparing or > thenCompareWith. But we should be consistent between Comparators and > Comparator, and consider that Comparators methods could be static > interface method on Comparator in the future. > > Cheers, > Henry > > > > 1) > > > > public static <T, U extends Comparable<? super U>> Comparator<T> > compareWith(Function<? super T, ? extends U> keyExtractor) { > > > > > > 2) > > default Comparator<T> thenCompareWith(Comparator<? super T> other) > > > > > > > > Best Regards, > > Ali Ebrahimi > > On Wed, Mar 6, 2013 at 12:16 AM, Henry Jen <henry....@oracle.com > > <mailto:henry....@oracle.com>> wrote: > > > > Hi, > > > > Another update to reflect functional interface renames involved in > the > > API, and a bug fix for a regression found earlier. > > > > CCC had been approved. Can we get it reviewed and pushed? > > > > [1] http://cr.openjdk.java.net/~henryjen/ccc/8001667.4/webrev > > > > Cheers, > > Henry > > > > > >