RFR 8009736: Comparator API cleanup
Remi Forax
forax at univ-mlv.fr
Fri Jun 14 05:29:37 PDT 2013
On 06/14/2013 12:58 PM, Paul Sandoz wrote:
> On Jun 14, 2013, at 12:37 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>>> FWIW i find this marginally clearer:
>>>
>>> NullComparator(boolean nullsFirst, Comparator<? super T> real) {
>>> this(nullsFirst ? -1 : 1, real);
>>> }
>>>
>>> private NullComparator(int sign, Comparator<? super T> real) {
>>> this.sign = sign;
>>> this.real = (Comparator<T>) Objects.requireNonNull(real);
>>> }
>>>
>>> but it's just nit-picking.
>> and why the NullComparator is specified as a class an not as a
>> serializable lambda
> It also overrides some default methods of Comparator.
Ok, I see,
Looking at the webrev, I haven't seen them in this ocean of red.
>
> Paul.
>
Rémi
More information about the lambda-dev
mailing list