PartialMutation.java

1
package net.bmahe.genetics4j.core.spec.mutation;
2
3
import java.util.Objects;
4
5
import org.apache.commons.lang3.Validate;
6
import org.immutables.value.Value;
7
8
@Value.Immutable
9
public abstract class PartialMutation implements MutationPolicy {
10
11
	@Value.Parameter
12
	public abstract int chromosomeIndex();
13
14
	@Value.Parameter
15
	public abstract MutationPolicy mutationPolicy();
16
17
	@Value.Check
18
	protected void check() {
19
		Validate.isTrue(chromosomeIndex() >= 0);
20
		Objects.requireNonNull(mutationPolicy());
21
	}
22
23
	public static PartialMutation of(final int chromosomeIndex, final MutationPolicy mutationPolicy) {
24 2 1. of : replaced return value with null for net/bmahe/genetics4j/core/spec/mutation/PartialMutation::of → NO_COVERAGE
2. of : removed call to net/bmahe/genetics4j/core/spec/mutation/ImmutablePartialMutation::of → NO_COVERAGE
		return ImmutablePartialMutation.of(chromosomeIndex, mutationPolicy);
25
	}
26
}

Mutations

24

1.1
Location : of
Killed by : none
replaced return value with null for net/bmahe/genetics4j/core/spec/mutation/PartialMutation::of → NO_COVERAGE

2.2
Location : of
Killed by : none
removed call to net/bmahe/genetics4j/core/spec/mutation/ImmutablePartialMutation::of → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.25.7 support