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

Mutations

18

1.1
Location : create
Killed by : com.github.dakusui.ut.thincrest.ut.styles.MoreFluentComparableNumberCheckerTest.test_Long(com.github.dakusui.ut.thincrest.ut.styles.MoreFluentComparableNumberCheckerTest)
replaced return value with null for com/github/dakusui/pcond/core/fluent/builtins/LongTransformer::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/LongTransformer::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/LongTransformer::transform → NO_COVERAGE

40

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

45

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

Active mutators

Tests examined


Report generated by PIT 1.7.3