| 1 | package com.github.dakusui.pcond.core.printable; | |
| 2 | ||
| 3 | import com.github.dakusui.pcond.forms.Printables; | |
| 4 | ||
| 5 | import java.util.List; | |
| 6 | import java.util.function.Function; | |
| 7 | import java.util.function.Predicate; | |
| 8 | ||
| 9 | import static java.util.Arrays.asList; | |
| 10 | ||
| 11 | public interface ParameterizedPredicateFactory<T> extends ParameterizedIdentifiableFactory<Predicate<T>> { | |
| 12 | class Builder<T> extends ParameterizedIdentifiableFactory.Builder<Predicate<T>, Builder<T>> { | |
| 13 | public ParameterizedPredicateFactory<T> buildProtected() { | |
| 14 |
1
1. buildProtected : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedPredicateFactory$Builder::buildProtected → KILLED |
return new ParameterizedPredicateFactory<T>() { |
| 15 | final Function<List<Object>, Predicate<T>> factory = Builder.this.factory; | |
| 16 | @Override | |
| 17 | public Predicate<T> create(Object... args) { | |
| 18 | List<Object> args_ = asList(args); | |
| 19 |
1
1. create : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedPredicateFactory$Builder$1::create → KILLED |
return Printables.predicate( |
| 20 | formatterFactory.apply(args_), | |
| 21 | this.toPrintablePredicate(args_)); | |
| 22 | } | |
| 23 | ||
| 24 | private Predicate<T> toPrintablePredicate(List<Object> args) { | |
| 25 | Predicate<T> predicate = factory.apply(args); | |
| 26 |
1
1. toPrintablePredicate : negated conditional → SURVIVED |
if (predicate instanceof PrintablePredicate) |
| 27 |
1
1. toPrintablePredicate : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedPredicateFactory$Builder$1::toPrintablePredicate → KILLED |
return predicate; |
| 28 |
1
1. toPrintablePredicate : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedPredicateFactory$Builder$1::toPrintablePredicate → KILLED |
return PrintablePredicateFactory.leaf(() -> { |
| 29 | assert false; | |
| 30 |
1
1. lambda$toPrintablePredicate$0 : replaced return value with "" for com/github/dakusui/pcond/core/printable/ParameterizedPredicateFactory$Builder$1::lambda$toPrintablePredicate$0 → NO_COVERAGE |
return null; |
| 31 | }, | |
| 32 | predicate, | |
| 33 | this); | |
| 34 | } | |
| 35 | }; | |
| 36 | } | |
| 37 | } | |
| 38 | } | |
Mutations | ||
| 14 |
1.1 |
|
| 19 |
1.1 |
|
| 26 |
1.1 |
|
| 27 |
1.1 |
|
| 28 |
1.1 |
|
| 30 |
1.1 |