| 1 | package com.github.valid8j.pcond.core.fluent.builtins; | |
| 2 | ||
| 3 | ||
| 4 | import com.github.valid8j.pcond.core.fluent.AbstractObjectTransformer; | |
| 5 | import com.github.valid8j.pcond.internals.InternalUtils; | |
| 6 | ||
| 7 | import java.util.function.Function; | |
| 8 | import java.util.function.Supplier; | |
| 9 | ||
| 10 | import static java.util.Objects.requireNonNull; | |
| 11 | ||
| 12 | public interface BooleanTransformer<T> extends | |
| 13 | AbstractObjectTransformer< | |
| 14 | BooleanTransformer<T>, | |
| 15 | BooleanChecker<T>, | |
| 16 | T, | |
| 17 | Boolean | |
| 18 | > { | |
| 19 | static BooleanTransformer<Boolean> create(Supplier<Boolean> value) { | |
| 20 |
1
1. create : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer::create → KILLED |
return new Impl<>(value, InternalUtils.trivialIdentityFunction()); |
| 21 | } | |
| 22 | ||
| 23 | class Impl<T> extends | |
| 24 | Base< | |
| 25 | BooleanTransformer<T>, | |
| 26 | BooleanChecker<T>, | |
| 27 | T, | |
| 28 | Boolean | |
| 29 | > implements | |
| 30 | BooleanTransformer<T> { | |
| 31 | public Impl(Supplier<T> value, Function<T, Boolean> transfomFunction) { | |
| 32 | super(value, transfomFunction); | |
| 33 | } | |
| 34 | ||
| 35 | @Override | |
| 36 | protected BooleanChecker<T> toChecker(Function<T, Boolean> transformFunction) { | |
| 37 |
1
1. toChecker : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer$Impl::toChecker → KILLED |
return new BooleanChecker.Impl<>(this::baseValue, requireNonNull(transformFunction)); |
| 38 | } | |
| 39 | ||
| 40 | @Override | |
| 41 | protected BooleanTransformer<Boolean> rebase() { | |
| 42 |
1
1. rebase : replaced return value with null for com/github/valid8j/pcond/core/fluent/builtins/BooleanTransformer$Impl::rebase → KILLED |
return new Impl<>(this::value, InternalUtils.trivialIdentityFunction()); |
| 43 | } | |
| 44 | } | |
| 45 | } | |
Mutations | ||
| 20 |
1.1 |
|
| 37 |
1.1 |
|
| 42 |
1.1 |