| 1 | package fr.sii.ogham.testing.sms.simulator.bean; | |
| 2 | ||
| 3 | /** | |
| 4 | * Type of Number based on SMPP version 3.4. | |
| 5 | * | |
| 6 | * @author Aurélien Baudet | |
| 7 | * | |
| 8 | */ | |
| 9 | public enum TypeOfNumber { | |
| 10 | UNKNOWN((byte) 0x00), | |
| 11 | INTERNATIONAL((byte) 0x01), | |
| 12 | NATIONAL((byte) 0x02), | |
| 13 | NETWORK_SPECIFIC((byte) 0x03), | |
| 14 | SUBSCRIBER_NUMBER((byte) 0x04), | |
| 15 | ALPHANUMERIC((byte) 0x05), | |
| 16 | ABBREVIATED((byte) 0x06); | |
| 17 | ||
| 18 | private final byte value; | |
| 19 | ||
| 20 | TypeOfNumber(byte value) { | |
| 21 | this.value = value; | |
| 22 | } | |
| 23 | ||
| 24 | /** | |
| 25 | * Get the byte value of the enum constant. | |
| 26 | * | |
| 27 | * @return the byte value. | |
| 28 | */ | |
| 29 | public byte value() { | |
| 30 |
3
1. value : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/bean/TypeOfNumber::value → NO_COVERAGE 2. value : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/bean/TypeOfNumber::value → SURVIVED 3. value : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/bean/TypeOfNumber::value → KILLED |
return value; |
| 31 | } | |
| 32 | ||
| 33 | /** | |
| 34 | * Get the {@link TypeOfNumber} based on the specified byte value | |
| 35 | * representation. | |
| 36 | * | |
| 37 | * @param value | |
| 38 | * is the byte value representation. | |
| 39 | * @return is the enum const related to the specified byte value. | |
| 40 | * @throws IllegalArgumentException | |
| 41 | * if there is no enum const associated with specified byte | |
| 42 | * value. | |
| 43 | */ | |
| 44 | public static TypeOfNumber valueOf(byte value) { | |
| 45 | for (TypeOfNumber val : values()) { | |
| 46 |
4
1. valueOf : negated conditional → NO_COVERAGE 2. valueOf : negated conditional → KILLED 3. valueOf : negated conditional → KILLED 4. valueOf : negated conditional → KILLED |
if (val.value == value) { |
| 47 |
4
1. valueOf : replaced return value with null for fr/sii/ogham/testing/sms/simulator/bean/TypeOfNumber::valueOf → NO_COVERAGE 2. valueOf : replaced return value with null for fr/sii/ogham/testing/sms/simulator/bean/TypeOfNumber::valueOf → KILLED 3. valueOf : replaced return value with null for fr/sii/ogham/testing/sms/simulator/bean/TypeOfNumber::valueOf → KILLED 4. valueOf : replaced return value with null for fr/sii/ogham/testing/sms/simulator/bean/TypeOfNumber::valueOf → KILLED |
return val; |
| 48 | } | |
| 49 | } | |
| 50 | throw new IllegalArgumentException("No enum const TypeOfNumber with value " + value); | |
| 51 | } | |
| 52 | } | |
Mutations | ||
| 30 |
1.1 2.2 3.3 |
|
| 46 |
1.1 2.2 3.3 4.4 |
|
| 47 |
1.1 2.2 3.3 4.4 |