| 1 | package fr.sii.ogham.core.builder.configuration; | |
| 2 | ||
| 3 | /** | |
| 4 | * Always overrides current value and returns the new value (even if null). | |
| 5 | * | |
| 6 | * @author Aurélien Baudet | |
| 7 | * | |
| 8 | * @param <V> | |
| 9 | * the type of the value | |
| 10 | */ | |
| 11 | public class AlwaysOverride<V> implements MayOverride<V> { | |
| 12 | private final V value; | |
| 13 | ||
| 14 | /** | |
| 15 | * Initializes with the new value to set. | |
| 16 | * | |
| 17 | * @param value | |
| 18 | * the new value | |
| 19 | */ | |
| 20 | public AlwaysOverride(V value) { | |
| 21 | super(); | |
| 22 | this.value = value; | |
| 23 | } | |
| 24 | ||
| 25 | @Override | |
| 26 | public V override(V currentValue) { | |
| 27 |
2
1. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/AlwaysOverride::override → NO_COVERAGE 2. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/AlwaysOverride::override → KILLED |
return value; |
| 28 | } | |
| 29 | ||
| 30 | } | |
Mutations | ||
| 27 |
1.1 2.2 |