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