| 1 | package net.bmahe.genetics4j.core.spec.selection; | |
| 2 | ||
| 3 | import java.util.Arrays; | |
| 4 | import java.util.List; | |
| 5 | import java.util.Objects; | |
| 6 | ||
| 7 | import org.immutables.value.Value; | |
| 8 | ||
| 9 | @Value.Immutable | |
| 10 | public abstract class MultiSelections implements SelectionPolicy { | |
| 11 | ||
| 12 | @Value.Parameter | |
| 13 | public abstract List<SelectionPolicy> selectionPolicies(); | |
| 14 | ||
| 15 | @Value.Check | |
| 16 | protected void check() { | |
| 17 | Objects.requireNonNull(selectionPolicies()); | |
| 18 | } | |
| 19 | ||
| 20 | public static MultiSelections of(final List<SelectionPolicy> selectionPolicies) { | |
| 21 |
2
1. of : replaced return value with null for net/bmahe/genetics4j/core/spec/selection/MultiSelections::of → NO_COVERAGE 2. of : removed call to net/bmahe/genetics4j/core/spec/selection/ImmutableMultiSelections::of → NO_COVERAGE |
return ImmutableMultiSelections.of(selectionPolicies); |
| 22 | } | |
| 23 | ||
| 24 | public static MultiSelections of(final SelectionPolicy... selectionPolicies) { | |
| 25 |
3
1. of : removed call to net/bmahe/genetics4j/core/spec/selection/ImmutableMultiSelections::of → NO_COVERAGE 2. of : removed call to java/util/Arrays::asList → NO_COVERAGE 3. of : replaced return value with null for net/bmahe/genetics4j/core/spec/selection/MultiSelections::of → NO_COVERAGE |
return ImmutableMultiSelections.of(Arrays.asList(selectionPolicies)); |
| 26 | } | |
| 27 | } | |
Mutations | ||
| 21 |
1.1 2.2 |
|
| 25 |
1.1 2.2 3.3 |