[BAEL-2932] Static import of Predicate.not
This commit is contained in:
parent
7f275f9b38
commit
f5937a3600
|
@ -4,6 +4,8 @@ import java.util.List;
|
|||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.function.Predicate.*;
|
||||
|
||||
public class FindPeople {
|
||||
public static void main(String[] args) {
|
||||
List<Person> people = List.of(
|
||||
|
@ -25,7 +27,7 @@ public class FindPeople {
|
|||
.collect(Collectors.toList());
|
||||
|
||||
people.stream()
|
||||
.filter(Predicate.not(Person::isAdult))
|
||||
.filter(not(Person::isAdult))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue