DoubleTransformer.java

1
package com.github.dakusui.pcond.core.fluent.builtins;
2
3
import java.util.function.Function;
4
import java.util.function.Predicate;
5
import java.util.function.Supplier;
6
7
import static com.github.dakusui.pcond.internals.InternalUtils.trivialIdentityFunction;
8
9
public interface DoubleTransformer<
10
    T
11
    > extends
12
    ComparableNumberTransformer<
13
        DoubleTransformer<T>,
14
        DoubleChecker<T>,
15
        T,
16
        Double> {
17
  static DoubleTransformer<Double> create(Supplier<Double> value) {
18 1 1. create : replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer::create → KILLED
    return new Impl<>(value, trivialIdentityFunction());
19
  }
20
21
  @SuppressWarnings("unchecked")
22
  default DoubleTransformer<T> transform(Function<DoubleTransformer<Double>, Predicate<Double>> clause) {
23 2 1. lambda$transform$0 : replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer::lambda$transform$0 → NO_COVERAGE
2. transform : replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer::transform → NO_COVERAGE
    return this.addTransformAndCheckClause(tx -> clause.apply((DoubleTransformer<Double>) tx));
24
  }
25
26
  class Impl<
27
      OIN
28
      > extends
29
      Base<
30
          DoubleTransformer<OIN>,
31
          DoubleChecker<OIN>,
32
          OIN,
33
          Double> implements
34
      DoubleTransformer<OIN> {
35
    public Impl(Supplier<OIN> baseValue, Function<OIN, Double> transformFunction) {
36
      super(baseValue, transformFunction);
37
    }
38
39
    @Override
40
    protected DoubleChecker<OIN> toChecker(Function<OIN, Double> transformFunction) {
41 1 1. toChecker : replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer$Impl::toChecker → KILLED
      return new DoubleChecker.Impl<>(this::baseValue, transformFunction);
42
    }
43
44
    @Override
45
    protected DoubleTransformer<Double> rebase() {
46 1 1. rebase : replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer$Impl::rebase → NO_COVERAGE
      return new DoubleTransformer.Impl<>(this::value, trivialIdentityFunction());
47
    }
48
  }
49
}

Mutations

18

1.1
Location : create
Killed by : com.github.dakusui.ut.thincrest.ut.styles.MoreFluentComparableNumberCheckerTest.test_greaterThan(com.github.dakusui.ut.thincrest.ut.styles.MoreFluentComparableNumberCheckerTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer::create → KILLED

23

1.1
Location : lambda$transform$0
Killed by : none
replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer::lambda$transform$0 → NO_COVERAGE

2.2
Location : transform
Killed by : none
replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer::transform → NO_COVERAGE

41

1.1
Location : toChecker
Killed by : com.github.dakusui.ut.thincrest.ut.styles.MoreFluentComparableNumberCheckerTest.test_greaterThan(com.github.dakusui.ut.thincrest.ut.styles.MoreFluentComparableNumberCheckerTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/DoubleTransformer$Impl::toChecker → KILLED

46

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

Active mutators

Tests examined


Report generated by PIT 1.7.3