StreamChecker.java

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
Location : noneMatch
Killed by : com.github.valid8j.ut.styles.MoreFluentStreamTest.test_noneMatche(com.github.valid8j.ut.styles.MoreFluentStreamTest)
replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker::noneMatch → KILLED

24

1.1
Location : anyMatch
Killed by : com.github.valid8j.ut.styles.MoreFluentStreamTest.test_anyMatch(com.github.valid8j.ut.styles.MoreFluentStreamTest)
replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker::anyMatch → KILLED

28

1.1
Location : allMatch
Killed by : com.github.valid8j.ut.styles.MoreFluentStreamTest.test_allMatch(com.github.valid8j.ut.styles.MoreFluentStreamTest)
replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker::allMatch → KILLED

47

1.1
Location : rebase
Killed by : none
replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/StreamChecker$Impl::rebase → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.7.3