| 1 | package com.github.dakusui.pcond.core.printable; | |
| 2 | ||
| 3 | import java.util.List; | |
| 4 | import java.util.Objects; | |
| 5 | import java.util.function.Function; | |
| 6 | import java.util.function.Supplier; | |
| 7 | ||
| 8 | public interface ParameterizedIdentifiableFactory<T> { | |
| 9 | T create(Object... args); | |
| 10 | ||
| 11 | abstract class Builder<T, B extends Builder<T, B>> { | |
| 12 | Function<List<Object>, Supplier<String>> formatterFactory; | |
| 13 | ||
| 14 | Function<List<Object>, T> factory; | |
| 15 | ||
| 16 | public B name(String name) { | |
| 17 |
3
1. lambda$name$1 : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedIdentifiableFactory$Builder::lambda$name$1 → KILLED 2. lambda$null$0 : replaced return value with "" for com/github/dakusui/pcond/core/printable/ParameterizedIdentifiableFactory$Builder::lambda$null$0 → KILLED 3. name : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedIdentifiableFactory$Builder::name → KILLED |
return this.formatterFactory((List<Object> args) -> () -> String.format("%s%s", name, args)); |
| 18 | } | |
| 19 | ||
| 20 | ||
| 21 | public ParameterizedIdentifiableFactory<T> factory(Function<List<Object>, T> predicateFactory) { | |
| 22 | this.factory = Objects.requireNonNull(predicateFactory); | |
| 23 |
1
1. factory : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedIdentifiableFactory$Builder::factory → KILLED |
return this.build(); |
| 24 | } | |
| 25 | ||
| 26 | @SuppressWarnings("unchecked") | |
| 27 | public B formatterFactory(Function<List<Object>, Supplier<String>> formatterFactory) { | |
| 28 | this.formatterFactory = Objects.requireNonNull(formatterFactory); | |
| 29 |
1
1. formatterFactory : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedIdentifiableFactory$Builder::formatterFactory → KILLED |
return (B) this; |
| 30 | } | |
| 31 | ||
| 32 | final public ParameterizedIdentifiableFactory<T> build() { | |
| 33 | Objects.requireNonNull(this.factory); | |
| 34 |
1
1. build : replaced return value with null for com/github/dakusui/pcond/core/printable/ParameterizedIdentifiableFactory$Builder::build → KILLED |
return buildProtected(); |
| 35 | } | |
| 36 | ||
| 37 | public abstract ParameterizedIdentifiableFactory<T> buildProtected(); | |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 17 |
1.1 2.2 3.3 |
|
| 23 |
1.1 |
|
| 29 |
1.1 |
|
| 34 |
1.1 |