NumberingPlanIndicator.java

1
package fr.sii.ogham.sms.message.addressing;
2
3
/**
4
 * NPI as described in GSM 03.40.
5
 * 
6
 * @author cdejonghe
7
 * 
8
 */
9
public enum NumberingPlanIndicator {
10
	/** Unknown = 0. */
11
	UNKNOWN((byte) 0),
12
	/** ISDN/telephone numbering plan (E163/E164) = 1. */
13
	ISDN_TELEPHONE((byte) 1),
14
	/** Data numbering plan (X.121) = 3. */
15
	DATA((byte) 3),
16
	/** Telex numbering plan (F.69) = 4. */
17
	TELEX((byte) 4),
18
	/** Land Mobile (E.212) =6. */
19
	LAND_MOBILE((byte) 6),
20
	/** National numbering plan = 8. */
21
	NATIONAL((byte) 8),
22
	/** Private numbering plan = 9. */
23
	PRIVATE((byte) 9),
24
	/** ERMES numbering plan (ETSI DE/PS 3 01-3) = 10. */
25
	ERMES((byte) 10),
26
	/** Internet (IP) = 13. */
27
	IP((byte) 13),
28
	/** WAP Client Id (to be defined by WAP Forum) = 18. */
29
	WAP((byte) 13);
30
31
	private final byte value;
32
33
	NumberingPlanIndicator(byte value) {
34
		this.value = value;
35
	}
36
37
	/**
38
	 * Get the byte value of the enum constant.
39
	 * 
40
	 * @return the byte value.
41
	 */
42
	public byte value() {
43 4 1. value : replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → NO_COVERAGE
2. value : replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → TIMED_OUT
3. value : replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → KILLED
4. value : replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → KILLED
		return value;
44
	}
45
46
	/**
47
	 * Get the NumberingPlanIndicator based on the specified byte
48
	 * value representation.
49
	 * 
50
	 * @param value
51
	 *            is the int / binary value representation.
52
	 * @return is the enum const related to the specified int value.
53
	 * @throws IllegalArgumentException
54
	 *             if there is no enum const associated with specified int
55
	 *             value.
56
	 */
57
	public static NumberingPlanIndicator valueOf(byte value) {
58
		for (NumberingPlanIndicator current : values()) {
59 1 1. valueOf : negated conditional → NO_COVERAGE
			if (current.value == value) {
60 1 1. valueOf : replaced return value with null for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::valueOf → NO_COVERAGE
				return current;
61
			}
62
		}
63
		throw new IllegalArgumentException("Invalid value for NumberingPlanIdentification : " + value);
64
	}
65
}

Mutations

43

1.1
Location : value
Killed by : none
replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → TIMED_OUT

2.2
Location : value
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → KILLED

3.3
Location : value
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → KILLED

4.4
Location : value
Killed by : none
replaced byte return with 0 for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::value → NO_COVERAGE

59

1.1
Location : valueOf
Killed by : none
negated conditional → NO_COVERAGE

60

1.1
Location : valueOf
Killed by : none
replaced return value with null for fr/sii/ogham/sms/message/addressing/NumberingPlanIndicator::valueOf → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT OGHAM