Predicates.java

1
package com.github.valid8j.pcond.forms;
2
3
import com.github.valid8j.pcond.core.printable.PrintablePredicateFactory;
4
import com.github.valid8j.pcond.core.refl.MethodQuery;
5
import com.github.valid8j.pcond.core.refl.Parameter;
6
import com.github.valid8j.pcond.internals.InternalChecks;
7
import com.github.valid8j.pcond.internals.InternalUtils;
8
9
import java.util.Collection;
10
import java.util.function.Function;
11
import java.util.function.Predicate;
12
import java.util.stream.Stream;
13
14
import static com.github.valid8j.pcond.core.refl.ReflUtils.invokeMethod;
15
import static com.github.valid8j.pcond.forms.Printables.function;
16
import static com.github.valid8j.pcond.forms.Printables.predicate;
17
import static com.github.valid8j.pcond.internals.InternalUtils.formatObject;
18
import static java.lang.String.format;
19
import static java.util.Arrays.asList;
20
import static java.util.Collections.singletonList;
21
import static java.util.Objects.requireNonNull;
22
23
/**
24
 * An entry point for acquiring predicate objects.
25
 * Predicates retrieved by methods in this class are all "printable".
26
 */
27
public class Predicates {
28
    private Predicates() {
29
    }
30
31
    public static <T> Predicate<T> alwaysTrue() {
32 1 1. alwaysTrue : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::alwaysTrue → KILLED
        return PrintablePredicateFactory.Leaf.ALWAYS_TRUE.instance();
33
    }
34
35
    public static Predicate<Boolean> isTrue() {
36 1 1. isTrue : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isTrue → KILLED
        return PrintablePredicateFactory.Leaf.IS_TRUE.instance();
37
    }
38
39
    public static Predicate<Boolean> isFalse() {
40 1 1. isFalse : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isFalse → KILLED
        return PrintablePredicateFactory.Leaf.IS_FALSE.instance();
41
    }
42
43
    public static <T> Predicate<T> isNull() {
44 1 1. isNull : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isNull → KILLED
        return PrintablePredicateFactory.Leaf.IS_NULL.instance();
45
    }
46
47
    public static <T> Predicate<T> isNotNull() {
48 1 1. isNotNull : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isNotNull → KILLED
        return PrintablePredicateFactory.Leaf.IS_NOT_NULL.instance();
49
    }
50
51
    public static <T> Predicate<T> isEqualTo(T value) {
52 1 1. isEqualTo : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEqualTo → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.IS_EQUAL_TO, singletonList(value));
53
    }
54
55
    public static <T> Predicate<T> isSameReferenceAs(T value) {
56 1 1. isSameReferenceAs : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isSameReferenceAs → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.OBJECT_IS_SAME_AS, singletonList(value));
57
    }
58
59
    @SuppressWarnings({"unchecked", "RedundantClassCall"})
60
    public static <T> Function<Class<?>, Predicate<T>> isInstanceOf() {
61 1 1. isInstanceOf : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isInstanceOf → KILLED
        return Function.class.cast(Def.IS_INSTANCE_OF$2);
62
    }
63
64
    public static Predicate<Object> isInstanceOf(Class<?> value) {
65 1 1. isInstanceOf : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isInstanceOf → KILLED
        return applyOnceExpectingPredicate(requireNonNull(value), isInstanceOf());
66
    }
67
68
    private static <T, R> Predicate<R> applyOnceExpectingPredicate(T value, Function<T, Predicate<R>> p) {
69 2 1. applyOnceExpectingPredicate : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::applyOnceExpectingPredicate → KILLED
2. lambda$applyOnceExpectingPredicate$0 : replaced return value with "" for com/github/valid8j/pcond/forms/Predicates::lambda$applyOnceExpectingPredicate$0 → KILLED
        return Printables.predicate(() -> String.format("%s[%s]", p, InternalUtils.formatObject(value)), p.apply(value));
70
    }
71
72
    public static <T extends Comparable<? super T>> Predicate<T> gt(T value) {
73 1 1. gt : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::gt → KILLED
        return greaterThan(value);
74
    }
75
76
    public static <T extends Comparable<? super T>> Predicate<T> greaterThan(T value) {
77 1 1. greaterThan : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::greaterThan → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.GREATER_THAN, singletonList(value));
78
    }
79
80
    public static <T extends Comparable<? super T>> Predicate<T> ge(T value) {
81 1 1. ge : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::ge → KILLED
        return greaterThanOrEqualTo(value);
82
    }
83
84
    public static <T extends Comparable<? super T>> Predicate<T> greaterThanOrEqualTo(T value) {
85 1 1. greaterThanOrEqualTo : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::greaterThanOrEqualTo → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.GREATER_THAN_OR_EQUAL_TO, singletonList(value));
86
    }
87
88
    public static <T extends Comparable<? super T>> Predicate<T> lt(T value) {
89 1 1. lt : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lt → KILLED
        return lessThan(value);
90
    }
91
92
    public static <T extends Comparable<? super T>> Predicate<T> lessThan(T value) {
93 1 1. lessThan : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lessThan → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.LESS_THAN, singletonList(value));
94
    }
95
96
    public static <T extends Comparable<? super T>> Predicate<T> le(T value) {
97 1 1. le : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::le → KILLED
        return lessThanOrEqualTo(value);
98
    }
99
100
    public static <T extends Comparable<? super T>> Predicate<T> lessThanOrEqualTo(T value) {
101 1 1. lessThanOrEqualTo : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lessThanOrEqualTo → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.LESS_THAN_OR_EQUAL_TO, singletonList(value));
102
    }
103
104
    public static <T extends Comparable<T>> Predicate<T> eq(T value) {
105 1 1. eq : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::eq → KILLED
        return equalTo(value);
106
    }
107
108
    public static <T extends Comparable<T>> Predicate<T> equalTo(T value) {
109 1 1. equalTo : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::equalTo → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.EQUAL_TO, singletonList(value));
110
    }
111
112
    public static Predicate<String> matchesRegex(String regex) {
113
        requireNonNull(regex);
114 1 1. matchesRegex : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::matchesRegex → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.MATCHES_REGEX, singletonList(regex));
115
    }
116
117
    public static Predicate<String> containsString(String string) {
118
        requireNonNull(string);
119 1 1. containsString : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::containsString → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.CONTAINS_STRING, singletonList(string));
120
    }
121
122
    public static Predicate<String> startsWith(String string) {
123
        requireNonNull(string);
124 1 1. startsWith : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::startsWith → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.STARTS_WITH, singletonList(string));
125
    }
126
127
    public static Predicate<String> endsWith(String string) {
128
        requireNonNull(string);
129 1 1. endsWith : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::endsWith → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.ENDS_WITH, singletonList(string));
130
    }
131
132
    public static Predicate<String> equalsIgnoreCase(String string) {
133
        requireNonNull(string);
134 1 1. equalsIgnoreCase : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::equalsIgnoreCase → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.EQUALS_IGNORE_CASE, singletonList(string));
135
    }
136
137
    public static Predicate<String> isEmptyString() {
138 1 1. isEmptyString : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEmptyString → KILLED
        return PrintablePredicateFactory.Leaf.IS_EMPTY_STRING.instance();
139
    }
140
141
    public static Predicate<String> isNullOrEmptyString() {
142 1 1. isNullOrEmptyString : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isNullOrEmptyString → KILLED
        return PrintablePredicateFactory.Leaf.IS_NULL_OR_EMPTY_STRING.instance();
143
    }
144
145
    public static <E> Predicate<Collection<E>> contains(Object entry) {
146 1 1. contains : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::contains → KILLED
        return PrintablePredicateFactory.ParameterizedLeafFactory.create(PrintablePredicateFactory.ParameterizedLeafFactory.CONTAINS, singletonList(entry));
147
    }
148
149
    public static Predicate<Object[]> isEmptyArray() {
150 1 1. isEmptyArray : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEmptyArray → KILLED
        return PrintablePredicateFactory.Leaf.IS_EMPTY_ARRAY.instance();
151
    }
152
153
    public static Predicate<? super Collection<?>> isEmpty() {
154 1 1. isEmpty : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEmpty → KILLED
        return PrintablePredicateFactory.Leaf.IS_EMPTY_COLLECTION.instance();
155
    }
156
157
    public static <E> Predicate<Stream<E>> allMatch(Predicate<E> predicate) {
158
        requireNonNull(predicate);
159 1 1. allMatch : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::allMatch → KILLED
        return PrintablePredicateFactory.allMatch(predicate);
160
    }
161
162
    public static <E> Predicate<Stream<E>> noneMatch(Predicate<E> predicate) {
163
        requireNonNull(predicate);
164 1 1. noneMatch : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::noneMatch → KILLED
        return PrintablePredicateFactory.noneMatch(predicate);
165
    }
166
167
    public static <E> Predicate<Stream<E>> anyMatch(Predicate<E> predicate) {
168
        requireNonNull(predicate);
169 1 1. anyMatch : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::anyMatch → KILLED
        return PrintablePredicateFactory.anyMatch(predicate);
170
    }
171
172
    @SafeVarargs
173
    public static <T> Predicate<T> and(Predicate<? super T>... predicates) {
174 1 1. and : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::and → KILLED
        return PrintablePredicateFactory.and(asList(predicates));
175
    }
176
177
    @SafeVarargs
178
    public static <T> Predicate<T> or(Predicate<? super T>... predicates) {
179 1 1. or : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::or → KILLED
        return PrintablePredicateFactory.or(asList(predicates));
180
    }
181
182
    @SafeVarargs
183
    public static <T> Predicate<T> allOf(Predicate<? super T>... predicates) {
184 1 1. allOf : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::allOf → KILLED
        return PrintablePredicateFactory.allOf(asList(predicates));
185
    }
186
187
    @SafeVarargs
188
    public static <T> Predicate<T> anyOf(Predicate<? super T>... predicates) {
189 1 1. anyOf : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::anyOf → KILLED
        return PrintablePredicateFactory.anyOf(asList(predicates));
190
    }
191
192
    public static <T> Predicate<T> not(Predicate<T> cond) {
193 1 1. not : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::not → KILLED
        return PrintablePredicateFactory.not(cond);
194
    }
195
196
    public static <O, P> PrintablePredicateFactory.TransformingPredicate.Factory<P, O> transform(String funcName, Function<O, P> func) {
197 1 1. transform : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::transform → KILLED
        return transform(Printables.function(funcName, func));
198
    }
199
200
    public static <O, P> PrintablePredicateFactory.TransformingPredicate.Factory<P, O> transform(Function<O, P> function) {
201 1 1. transform : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::transform → KILLED
        return PrintablePredicateFactory.transform(function);
202
    }
203
204
    /**
205
     * // @formatter:off
206
   * Returns a {@link Predicate} created from a method specified by a {@code methodQuery}.
207
   * If the {@code methodQuery} matches none or more than one methods, a {@code RuntimeException} will be thrown.
208
   *
209
   * The suffix {@code p} stands for "predicate" following the custom in LISP culture
210
   * and it is necessary to avoid collision with {@link Functions#call( MethodQuery )} method.
211
   *
212
   * // @formatter:on
213
     *
214
     * @param methodQuery A query object that specifies a method to be invoked by the returned predicate.
215
     * @param <T>         the type of the input to the returned predicate
216
     * @return Created predicate.
217
     * @see Functions#classMethod(Class, String, Object[])
218
     * @see Functions#instanceMethod(Object, String, Object[])
219
     * @see Functions#parameter()
220
     */
221
    @SuppressWarnings("ConstantConditions")
222
    public static <T> Predicate<T> callp(MethodQuery methodQuery) {
223 1 1. callp : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::callp → KILLED
        return predicate(
224
                methodQuery.describe(),
225 2 1. lambda$callp$5 : replaced boolean return with true for com/github/valid8j/pcond/forms/Predicates::lambda$callp$5 → SURVIVED
2. lambda$callp$5 : replaced boolean return with false for com/github/valid8j/pcond/forms/Predicates::lambda$callp$5 → KILLED
                t -> InternalChecks.ensureValue(
226 3 1. lambda$null$1 : replaced boolean return with false for com/github/valid8j/pcond/forms/Predicates::lambda$null$1 → KILLED
2. lambda$null$1 : replaced boolean return with true for com/github/valid8j/pcond/forms/Predicates::lambda$null$1 → KILLED
3. lambda$null$2 : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lambda$null$2 → KILLED
                        invokeMethod(methodQuery.bindActualArguments((o) -> o instanceof Parameter, o -> t)),
227 2 1. lambda$null$3 : replaced boolean return with true for com/github/valid8j/pcond/forms/Predicates::lambda$null$3 → SURVIVED
2. lambda$null$3 : replaced boolean return with false for com/github/valid8j/pcond/forms/Predicates::lambda$null$3 → KILLED
                        v -> v instanceof Boolean,
228 1 1. lambda$null$4 : replaced return value with "" for com/github/valid8j/pcond/forms/Predicates::lambda$null$4 → SURVIVED
                        v -> format("Method matched with '%s' must return a boolean value but it gave: '%s'.", methodQuery.describe(), v)));
229
    }
230
231
    /**
232
     * // @formatter:off
233
   * Returns a predicate that calls a method which matches the given {@code methodName}
234
   * and {@code args} on the object given as input to it.
235
   *
236
   * Note that method look up is done when the predicate is applied.
237
   * This means this method does not throw any exception by itself and in case
238
   * you give wrong {@code methodName} or {@code arguments}, an exception will be
239
   * thrown when the returned function is applied.
240
   * // @formatter:on
241
     *
242
     * @param methodName The method name
243
     * @param arguments  Arguments passed to the method.
244
     * @param <T>        The type of input to the returned predicate
245
     * @return A predicate that invokes the method matching the {@code methodName} and {@code args}
246
     * @see Functions#parameter()
247
     */
248
    public static <T> Predicate<T> callp(String methodName, Object... arguments) {
249 1 1. callp : replaced return value with null for com/github/valid8j/pcond/forms/Predicates::callp → KILLED
        return callp(Functions.instanceMethod(Functions.parameter(), methodName, arguments));
250
    }
251
252
    enum Def {
253
        ;
254
255 2 1. lambda$static$0 : replaced return value with "" for com/github/valid8j/pcond/forms/Predicates$Def::lambda$static$0 → KILLED
2. lambda$static$1 : replaced return value with null for com/github/valid8j/pcond/forms/Predicates$Def::lambda$static$1 → KILLED
        public static final Function<Class<?>, Predicate<?>> IS_INSTANCE_OF$2 = Printables.function(() -> "isInstanceOf", (Class<?> c) -> c::isInstance);
256
    }
257
258
}

Mutations

32

1.1
Location : alwaysTrue
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$NotTest.test(com.github.valid8j.ut.utilstest.PredicatesTest$NotTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::alwaysTrue → KILLED

36

1.1
Location : isTrue
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[16](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isTrue → KILLED

40

1.1
Location : isFalse
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[17](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isFalse → KILLED

44

1.1
Location : isNull
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$IsNullTest
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isNull → KILLED

48

1.1
Location : isNotNull
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$IsNotNullTest
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isNotNull → KILLED

52

1.1
Location : isEqualTo
Killed by : com.github.valid8j.ut.internal.PrintablePredicateTest$LeafPred.testHashCode(com.github.valid8j.ut.internal.PrintablePredicateTest$LeafPred)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEqualTo → KILLED

56

1.1
Location : isSameReferenceAs
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[21](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isSameReferenceAs → KILLED

61

1.1
Location : isInstanceOf
Killed by : com.github.valid8j.ut.typesupports.ObjectTest.givenNull(com.github.valid8j.ut.typesupports.ObjectTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isInstanceOf → KILLED

65

1.1
Location : isInstanceOf
Killed by : com.github.valid8j.ut.typesupports.ObjectTest.givenNull(com.github.valid8j.ut.typesupports.ObjectTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isInstanceOf → KILLED

69

1.1
Location : applyOnceExpectingPredicate
Killed by : com.github.valid8j.ut.typesupports.ObjectTest.givenNull(com.github.valid8j.ut.typesupports.ObjectTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::applyOnceExpectingPredicate → KILLED

2.2
Location : lambda$applyOnceExpectingPredicate$0
Killed by : com.github.valid8j.ut.internal.ParameterizedPredicatesTest.exerciseToString[5](com.github.valid8j.ut.internal.ParameterizedPredicatesTest)
replaced return value with "" for com/github/valid8j/pcond/forms/Predicates::lambda$applyOnceExpectingPredicate$0 → KILLED

73

1.1
Location : gt
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$GtTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$GtTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::gt → KILLED

77

1.1
Location : greaterThan
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$GtTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$GtTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::greaterThan → KILLED

81

1.1
Location : ge
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$GeTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$GeTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::ge → KILLED

85

1.1
Location : greaterThanOrEqualTo
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$GeTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$GeTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::greaterThanOrEqualTo → KILLED

89

1.1
Location : lt
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$LtTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$LtTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lt → KILLED

93

1.1
Location : lessThan
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$LtTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$LtTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lessThan → KILLED

97

1.1
Location : le
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$LeTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$LeTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::le → KILLED

101

1.1
Location : lessThanOrEqualTo
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$LeTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$LeTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lessThanOrEqualTo → KILLED

105

1.1
Location : eq
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$EqTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$EqTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::eq → KILLED

109

1.1
Location : equalTo
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$EqTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$EqTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::equalTo → KILLED

114

1.1
Location : matchesRegex
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$MatchesRegexTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$MatchesRegexTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::matchesRegex → KILLED

119

1.1
Location : containsString
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$ContainsStringTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$ContainsStringTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::containsString → KILLED

124

1.1
Location : startsWith
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[29](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::startsWith → KILLED

129

1.1
Location : endsWith
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[30](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::endsWith → KILLED

134

1.1
Location : equalsIgnoreCase
Killed by : com.github.valid8j.ut.internal.ParameterizedPredicatesTest.exerciseToString[8](com.github.valid8j.ut.internal.ParameterizedPredicatesTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::equalsIgnoreCase → KILLED

138

1.1
Location : isEmptyString
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$AndTest
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEmptyString → KILLED

142

1.1
Location : isNullOrEmptyString
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[32](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isNullOrEmptyString → KILLED

146

1.1
Location : contains
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[33](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::contains → KILLED

150

1.1
Location : isEmptyArray
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[34](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEmptyArray → KILLED

154

1.1
Location : isEmpty
Killed by : com.github.valid8j.ut.equallness.EqualnessTest.equalHashCode[35](com.github.valid8j.ut.equallness.EqualnessTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::isEmpty → KILLED

159

1.1
Location : allMatch
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$AllMatchTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$AllMatchTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::allMatch → KILLED

164

1.1
Location : noneMatch
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$NoneMatchTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$NoneMatchTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::noneMatch → KILLED

169

1.1
Location : anyMatch
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$AnyMatchTest.whenMet$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$AnyMatchTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::anyMatch → KILLED

174

1.1
Location : and
Killed by : com.github.valid8j.ut.internal.PrintablesTest$PredicateTest.givenPredicateReturnedByAnd$whenTest$thenWorksRight(com.github.valid8j.ut.internal.PrintablesTest$PredicateTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::and → KILLED

179

1.1
Location : or
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$OrTest.performSingleOr$thenTrue(com.github.valid8j.ut.utilstest.PredicatesTest$OrTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::or → KILLED

184

1.1
Location : allOf
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$FindStringTest.example(com.github.valid8j.ut.utilstest.PredicatesTest$FindStringTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::allOf → KILLED

189

1.1
Location : anyOf
Killed by : com.github.valid8j.ut.propertybased.tests.AnyOfPredicateTest.exerciseTestCase[2: whenPredicatesAllReturningTrueUnderAnyOf_thenPasses](com.github.valid8j.ut.propertybased.tests.AnyOfPredicateTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::anyOf → KILLED

193

1.1
Location : not
Killed by : com.github.valid8j.ut.utilstest.PredicatesTest$NotTest.test(com.github.valid8j.ut.utilstest.PredicatesTest$NotTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::not → KILLED

197

1.1
Location : transform
Killed by : com.github.valid8j.entrypoints.RequiresTest.testRequireWithCustomStringTransformingPredicate(com.github.valid8j.entrypoints.RequiresTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::transform → KILLED

201

1.1
Location : transform
Killed by : com.github.valid8j.ut.internal.TransformingPredicateTest.testEquals(com.github.valid8j.ut.internal.TransformingPredicateTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::transform → KILLED

223

1.1
Location : callp
Killed by : com.github.valid8j.ut.internal.CallTest.methodIncompatible(com.github.valid8j.ut.internal.CallTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::callp → KILLED

225

1.1
Location : lambda$callp$5
Killed by : com.github.valid8j.ut.internal.CallTest.narrowerMethodIsChosen(com.github.valid8j.ut.internal.CallTest)
replaced boolean return with false for com/github/valid8j/pcond/forms/Predicates::lambda$callp$5 → KILLED

2.2
Location : lambda$callp$5
Killed by : none
replaced boolean return with true for com/github/valid8j/pcond/forms/Predicates::lambda$callp$5 → SURVIVED

226

1.1
Location : lambda$null$1
Killed by : com.github.valid8j.ut.internal.CallTest.methodIncompatible(com.github.valid8j.ut.internal.CallTest)
replaced boolean return with false for com/github/valid8j/pcond/forms/Predicates::lambda$null$1 → KILLED

2.2
Location : lambda$null$1
Killed by : com.github.valid8j.ut.internal.CallTest.narrowerMethodIsChosen(com.github.valid8j.ut.internal.CallTest)
replaced boolean return with true for com/github/valid8j/pcond/forms/Predicates::lambda$null$1 → KILLED

3.3
Location : lambda$null$2
Killed by : com.github.valid8j.ut.internal.CallTest.methodIncompatible(com.github.valid8j.ut.internal.CallTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::lambda$null$2 → KILLED

227

1.1
Location : lambda$null$3
Killed by : com.github.valid8j.ut.internal.CallTest.narrowerMethodIsChosen(com.github.valid8j.ut.internal.CallTest)
replaced boolean return with false for com/github/valid8j/pcond/forms/Predicates::lambda$null$3 → KILLED

2.2
Location : lambda$null$3
Killed by : none
replaced boolean return with true for com/github/valid8j/pcond/forms/Predicates::lambda$null$3 → SURVIVED

228

1.1
Location : lambda$null$4
Killed by : none
replaced return value with "" for com/github/valid8j/pcond/forms/Predicates::lambda$null$4 → SURVIVED

249

1.1
Location : callp
Killed by : com.github.valid8j.ut.internal.CallTest.methodIncompatible(com.github.valid8j.ut.internal.CallTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates::callp → KILLED

255

1.1
Location : lambda$static$0
Killed by : com.github.valid8j.ut.internal.ParameterizedPredicatesTest.exerciseToString[5](com.github.valid8j.ut.internal.ParameterizedPredicatesTest)
replaced return value with "" for com/github/valid8j/pcond/forms/Predicates$Def::lambda$static$0 → KILLED

2.2
Location : lambda$static$1
Killed by : com.github.valid8j.ut.typesupports.ObjectTest.givenNull(com.github.valid8j.ut.typesupports.ObjectTest)
replaced return value with null for com/github/valid8j/pcond/forms/Predicates$Def::lambda$static$1 → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3