1 | package com.github.valid8j.pcond.core.fluent.builtins; | |
2 | ||
3 | import com.github.valid8j.pcond.core.fluent.AbstractObjectChecker; | |
4 | import com.github.valid8j.pcond.forms.Predicates; | |
5 | import com.github.valid8j.pcond.internals.InternalUtils; | |
6 | ||
7 | import java.util.function.Function; | |
8 | import java.util.function.Predicate; | |
9 | import java.util.function.Supplier; | |
10 | import java.util.stream.Stream; | |
11 | ||
12 | public interface StreamChecker< | |
13 | T, | |
14 | E> extends | |
15 | AbstractObjectChecker< | |
16 | StreamChecker<T, E>, | |
17 | T, | |
18 | Stream<E>> { | |
19 | default StreamChecker<T, E> noneMatch(Predicate<E> p) { | |
20 |
1
1. noneMatch : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker::noneMatch → KILLED |
return this.checkWithPredicate(Predicates.noneMatch(p)); |
21 | } | |
22 | ||
23 | default StreamChecker<T, E> anyMatch(Predicate<E> p) { | |
24 |
1
1. anyMatch : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker::anyMatch → KILLED |
return this.checkWithPredicate(Predicates.anyMatch(p)); |
25 | } | |
26 | ||
27 | default StreamChecker<T, E> allMatch(Predicate<E> p) { | |
28 |
1
1. allMatch : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker::allMatch → KILLED |
return this.checkWithPredicate(Predicates.allMatch(p)); |
29 | } | |
30 | ||
31 | class Impl< | |
32 | T, | |
33 | E> extends | |
34 | Base< | |
35 | StreamChecker<T, E>, | |
36 | T, | |
37 | Stream<E> | |
38 | > | |
39 | ||
40 | implements StreamChecker<T, E> { | |
41 | public Impl(Supplier<T> rootValue, Function<T, Stream<E>> root) { | |
42 | super(rootValue, root); | |
43 | } | |
44 | ||
45 | @Override | |
46 | protected StreamChecker<Stream<E>, E> rebase() { | |
47 |
1
1. rebase : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker$Impl::rebase → SURVIVED |
return new Impl<>(this::value, InternalUtils.trivialIdentityFunction()); |
48 | } | |
49 | } | |
50 | } | |
Mutations | ||
20 |
1.1 |
|
24 |
1.1 |
|
28 |
1.1 |
|
47 |
1.1 |