StreamChecker.java

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

Mutations

21

1.1
Location : noneMatch
Killed by : com.github.dakusui.ut.thincrest.ut.styles.MoreFluentStreamTest.test_noneMatche(com.github.dakusui.ut.thincrest.ut.styles.MoreFluentStreamTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/StreamChecker::noneMatch → KILLED

25

1.1
Location : anyMatch
Killed by : com.github.dakusui.pcond.types.StreamTest.streamTransformerTest(com.github.dakusui.pcond.types.StreamTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/StreamChecker::anyMatch → KILLED

29

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

48

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

Active mutators

Tests examined


Report generated by PIT 1.7.3