negate();
}
at least until JEP 300 [1] is implemented.
regards,
Rémi
[1] https://bugs.openjdk.java.net/browse/JDK-8043488
- Mail original -
> De: "Jim Laskey"
> À: "core-libs-dev"
> Envoyé: Vendredi 18 Mai 2018 18:35:24
> Objet: RFR: CSR - JDK-82034
Hi Jim,
- Mail original -
> De: "Jim Laskey"
> À: "core-libs-dev"
> Cc: "Remi Forax" , "Brian Goetz" ,
> "Paul Sandoz"
> Envoyé: Vendredi 18 Mai 2018 20:48:35
> Objet: Re: RFR: CSR - JDK-8203428 Predicate::not
>
ot; , "Jim Laskey"
>>
>> Cc: "core-libs-dev"
>> Envoyé: Vendredi 18 Mai 2018 20:08:42
>> Objet: Re: RFR: CSR - JDK-8203428 Predicate::not
>
>> We did discover that default methods on FIs combined with subtyping of
>> FIs caused troub
- Mail original -
> De: "Brian Goetz"
> À: "Paul Sandoz" , "Jim Laskey"
>
> Cc: "core-libs-dev"
> Envoyé: Vendredi 18 Mai 2018 20:08:42
> Objet: Re: RFR: CSR - JDK-8203428 Predicate::not
> We did discover that default m
We did discover that default methods on FIs combined with subtyping of
FIs caused trouble. But static methods are fine.
If we're going to do Xxx.of(...), we should do it uniformly across FIs,
not just for Predicate. I think this is a reasonable move, but we don't
have to do it right now. (T
> On May 18, 2018, at 9:35 AM, Jim Laskey wrote:
>
> Introduce a new static method Predicate::not which will allow developers to
> negate predicate lambdas trivially.
>
>
> csr: https://bugs.openjdk.java.net/browse/JDK-8203428
+1 thank you for taking action on this.
Predicate not captures
Actually it would be:
Predicate.of(String::isEmpty).negate()
But
not(String::isEmpty) reads almost like !str.isEmpty()
-Sundar
On 18/05/18, 10:41 PM, Daniel Fuchs wrote:
Hi Jim,
Have you thought of introducing something like:
static Predicate Predicate.of(Predicate target) {
re
Hi Jim,
Have you thought of introducing something like:
static Predicate Predicate.of(Predicate target) {
return target;
}
instead?
I think that might allow you to do things like:
Stream.of("", "A", "b", "c")
.filter(Predicate.of(String::isEmpty).not())
.filter(Predicate.of(
+1
-Sundar
On 18/05/18, 10:05 PM, Jim Laskey wrote:
Introduce a new static method Predicate::not which will allow developers to
negate predicate lambdas trivially.
csr: https://bugs.openjdk.java.net/browse/JDK-8203428
On 18/05/18 17:35, Jim Laskey wrote:
Introduce a new static method Predicate::not which will allow developers to
negate predicate lambdas trivially.
csr: https://bugs.openjdk.java.net/browse/JDK-8203428
I have looked for this a number of times. +1
-Chris.
Introduce a new static method Predicate::not which will allow developers to
negate predicate lambdas trivially.
csr: https://bugs.openjdk.java.net/browse/JDK-8203428
11 matches
Mail list logo