1 | package fr.sii.ogham.sms.util.http; | |
2 | ||
3 | /** | |
4 | * Simple abstraction for manipulating parameters that has a name and a value. | |
5 | * | |
6 | * @author Aurélien Baudet | |
7 | * | |
8 | */ | |
9 | public class Parameter { | |
10 | /** | |
11 | * The name of the parameter | |
12 | */ | |
13 | private final String name; | |
14 | ||
15 | /** | |
16 | * The parameter value | |
17 | */ | |
18 | private final String value; | |
19 | ||
20 | public Parameter(String name, String value) { | |
21 | super(); | |
22 | this.name = name; | |
23 | this.value = value; | |
24 | } | |
25 | ||
26 | /** | |
27 | * If {@code value} is null, keep null value. Otherwise {@code value} is | |
28 | * converted to string using {@link String#valueOf(Object)}. | |
29 | * | |
30 | * @param name | |
31 | * the parameter name | |
32 | * @param value | |
33 | * the parameter value | |
34 | */ | |
35 | public Parameter(String name, Object value) { | |
36 |
2
1. <init> : negated conditional → NO_COVERAGE 2. <init> : negated conditional → KILLED |
this(name, value == null ? null : String.valueOf(value)); |
37 | } | |
38 | ||
39 | public String getName() { | |
40 |
2
1. getName : replaced return value with "" for fr/sii/ogham/sms/util/http/Parameter::getName → NO_COVERAGE 2. getName : replaced return value with "" for fr/sii/ogham/sms/util/http/Parameter::getName → KILLED |
return name; |
41 | } | |
42 | ||
43 | public String getValue() { | |
44 |
2
1. getValue : replaced return value with "" for fr/sii/ogham/sms/util/http/Parameter::getValue → NO_COVERAGE 2. getValue : replaced return value with "" for fr/sii/ogham/sms/util/http/Parameter::getValue → KILLED |
return value; |
45 | } | |
46 | } | |
Mutations | ||
36 |
1.1 2.2 |
|
40 |
1.1 2.2 |
|
44 |
1.1 2.2 |