Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-adapter-utils / src / main / java / org / onap / so / openstack / utils / MsoHeatEnvironmentParameter.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.openstack.utils;
22
23 import java.util.Objects;
24
25 public class MsoHeatEnvironmentParameter {
26
27     private String name;
28     private String value;
29
30     public MsoHeatEnvironmentParameter(String name, String value) {
31         super();
32         this.name = name;
33         this.value = value;
34     }
35
36     public MsoHeatEnvironmentParameter(String name) {
37         // Allow to initialize with a null value
38         this(name, null);
39     }
40
41     public MsoHeatEnvironmentParameter() {
42         this(null, null);
43     }
44
45     public String getName() {
46         return this.name;
47     }
48
49     public void setName(String name) {
50         this.name = name;
51     }
52
53     public String getValue() {
54         return this.value;
55     }
56
57     public void setValue(String value) {
58         this.value = value;
59     }
60
61     public String toString() {
62         return this.name + ": " + this.value;
63     }
64
65     public boolean equals(Object o) {
66         if (!(o instanceof MsoHeatEnvironmentParameter)) {
67             return false;
68         }
69         if (this == o) {
70             return true;
71         }
72         MsoHeatEnvironmentParameter hep = (MsoHeatEnvironmentParameter) o;
73         // If the name of the parameter is the same, then they're equal
74         return hep.getName().equals(this.getName());
75     }
76
77     public int hashCode() {
78         return Objects.hashCode(this.name);
79     }
80
81
82 }