f52d6022820a45ffd9eb515e38b164e8e1f23a66
[policy/apex-pdp.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
4  *  Modifications Copyright (C) 2019 Nordix Foundation.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.apex.context.test.concepts;
23
24 import java.io.Serializable;
25
26 /**
27  * The Class TestPolicyContextItem.
28  */
29 public class TestPolicyContextItem implements Serializable {
30     private static final long serialVersionUID = 6336372857646152910L;
31
32     private static final int HASH_PRIME_1 = 31;
33
34     private TestContextStringItem testPolicyContextItem000;
35     private TestContextLongItem testPolicyContextItem001;
36     private TestContextDoubleItem testPolicyContextItem002;
37     private TestContextBooleanItem testPolicyContextItem003;
38     private TestContextLongItem testPolicyContextItem004;
39     private TestContextTreeMapItem testPolicyContextItem005;
40
41     /**
42      * Gets the test policy context item 000.
43      *
44      * @return the test policy context item 000
45      */
46     public TestContextStringItem getTestPolicyContextItem000() {
47         return testPolicyContextItem000;
48     }
49
50     /**
51      * Sets the test policy context item 000.
52      *
53      * @param testPolicyContextItem000 the test policy context item 000
54      */
55     public void setTestPolicyContextItem000(final TestContextStringItem testPolicyContextItem000) {
56         this.testPolicyContextItem000 = testPolicyContextItem000;
57     }
58
59     /**
60      * Gets the test policy context item 001.
61      *
62      * @return the test policy context item 001
63      */
64     public TestContextLongItem getTestPolicyContextItem001() {
65         return testPolicyContextItem001;
66     }
67
68     /**
69      * Sets the test policy context item 001.
70      *
71      * @param testPolicyContextItem001 the test policy context item 001
72      */
73     public void setTestPolicyContextItem001(final TestContextLongItem testPolicyContextItem001) {
74         this.testPolicyContextItem001 = testPolicyContextItem001;
75     }
76
77     /**
78      * Gets the test policy context item 002.
79      *
80      * @return the test policy context item 002
81      */
82     public TestContextDoubleItem getTestPolicyContextItem002() {
83         return testPolicyContextItem002;
84     }
85
86     /**
87      * Sets the test policy context item 002.
88      *
89      * @param testPolicyContextItem002 the test policy context item 002
90      */
91     public void setTestPolicyContextItem002(final TestContextDoubleItem testPolicyContextItem002) {
92         this.testPolicyContextItem002 = testPolicyContextItem002;
93     }
94
95     /**
96      * Gets the test policy context item 003.
97      *
98      * @return the test policy context item 003
99      */
100     public TestContextBooleanItem getTestPolicyContextItem003() {
101         return testPolicyContextItem003;
102     }
103
104     /**
105      * Sets the test policy context item 003.
106      *
107      * @param testPolicyContextItem003 the test policy context item 003
108      */
109     public void setTestPolicyContextItem003(final TestContextBooleanItem testPolicyContextItem003) {
110         this.testPolicyContextItem003 = testPolicyContextItem003;
111     }
112
113     /**
114      * Gets the test policy context item 004.
115      *
116      * @return the test policy context item 004
117      */
118     public TestContextLongItem getTestPolicyContextItem004() {
119         return testPolicyContextItem004;
120     }
121
122     /**
123      * Sets the test policy context item 004.
124      *
125      * @param testPolicyContextItem004 the test policy context item 004
126      */
127     public void setTestPolicyContextItem004(final TestContextLongItem testPolicyContextItem004) {
128         this.testPolicyContextItem004 = testPolicyContextItem004;
129     }
130
131     /**
132      * Gets the test policy context item 005.
133      *
134      * @return the test policy context item 005
135      */
136     public TestContextTreeMapItem getTestPolicyContextItem005() {
137         return testPolicyContextItem005;
138     }
139
140     /**
141      * Sets the test policy context item 005.
142      *
143      * @param testPolicyContextItem005 the test policy context item 005
144      */
145     public void setTestPolicyContextItem005(final TestContextTreeMapItem testPolicyContextItem005) {
146         this.testPolicyContextItem005 = testPolicyContextItem005;
147     }
148
149     /*
150      * (non-Javadoc)
151      *
152      * @see java.lang.Object#hashCode()
153      */
154     @Override
155     public int hashCode() {
156         final int prime = HASH_PRIME_1;
157         int result = 1;
158         result = prime * result + ((testPolicyContextItem000 == null) ? 0 : testPolicyContextItem000.hashCode());
159         result = prime * result + ((testPolicyContextItem001 == null) ? 0 : testPolicyContextItem001.hashCode());
160         result = prime * result + ((testPolicyContextItem002 == null) ? 0 : testPolicyContextItem002.hashCode());
161         result = prime * result + ((testPolicyContextItem003 == null) ? 0 : testPolicyContextItem003.hashCode());
162         result = prime * result + ((testPolicyContextItem004 == null) ? 0 : testPolicyContextItem004.hashCode());
163         result = prime * result + ((testPolicyContextItem005 == null) ? 0 : testPolicyContextItem005.hashCode());
164         return result;
165     }
166
167     /*
168      * (non-Javadoc)
169      *
170      * @see java.lang.Object#equals(java.lang.Object)
171      */
172     @Override
173     public boolean equals(final Object obj) {
174         if (this == obj) {
175             return true;
176         }
177         if (obj == null) {
178             return false;
179         }
180         if (getClass() != obj.getClass()) {
181             return false;
182         }
183         final TestPolicyContextItem other = (TestPolicyContextItem) obj;
184         if (testPolicyContextItem000 == null) {
185             if (other.testPolicyContextItem000 != null) {
186                 return false;
187             }
188         } else if (!testPolicyContextItem000.equals(other.testPolicyContextItem000)) {
189             return false;
190         }
191         if (testPolicyContextItem001 == null) {
192             if (other.testPolicyContextItem001 != null) {
193                 return false;
194             }
195         } else if (!testPolicyContextItem001.equals(other.testPolicyContextItem001)) {
196             return false;
197         }
198         if (testPolicyContextItem002 == null) {
199             if (other.testPolicyContextItem002 != null) {
200                 return false;
201             }
202         } else if (!testPolicyContextItem002.equals(other.testPolicyContextItem002)) {
203             return false;
204         }
205         if (testPolicyContextItem003 == null) {
206             if (other.testPolicyContextItem003 != null) {
207                 return false;
208             }
209         } else if (!testPolicyContextItem003.equals(other.testPolicyContextItem003)) {
210             return false;
211         }
212         if (testPolicyContextItem004 == null) {
213             if (other.testPolicyContextItem004 != null) {
214                 return false;
215             }
216         } else if (!testPolicyContextItem004.equals(other.testPolicyContextItem004)) {
217             return false;
218         }
219         if (testPolicyContextItem005 == null) {
220             if (other.testPolicyContextItem005 != null) {
221                 return false;
222             }
223         } else if (!testPolicyContextItem005.equals(other.testPolicyContextItem005)) {
224             return false;
225         }
226         return true;
227     }
228
229     /*
230      * (non-Javadoc)
231      *
232      * @see java.lang.Object#toString()
233      */
234     @Override
235     public String toString() {
236         return "TestPolicyContextItem [testPolicyContextItem000=" + testPolicyContextItem000
237                 + ", testPolicyContextItem001=" + testPolicyContextItem001 + ", testPolicyContextItem002="
238                 + testPolicyContextItem002 + ", testPolicyContextItem003=" + testPolicyContextItem003
239                 + ", testPolicyContextItem004=" + testPolicyContextItem004 + ", testPolicyContextItem005="
240                 + testPolicyContextItem005 + "]";
241     }
242 }