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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.apex.context.test.concepts;
23 import java.io.Serializable;
25 import java.util.TreeSet;
28 * The Class TestContextItem00B.
30 public class TestContextTreeSetItem implements Serializable {
31 private static final long serialVersionUID = 1254589722957250388L;
33 private static final int HASH_PRIME_1 = 31;
35 private TreeSet<String> setValue = new TreeSet<String>();
40 public TestContextTreeSetItem() {}
45 * @param setArray the set array
47 public TestContextTreeSetItem(final String[] setArray) {}
52 * @param setValue the set value
54 public TestContextTreeSetItem(final TreeSet<String> setValue) {
55 this.setValue = setValue;
61 * @return the sets the value
63 public Set<String> getSetValue() {
64 if (setValue == null) {
65 setValue = new TreeSet<String>();
73 * @param setValue the sets the value
75 public void setSetValue(final TreeSet<String> setValue) {
76 this.setValue = setValue;
82 * @see java.lang.Object#hashCode()
85 public int hashCode() {
86 final int prime = HASH_PRIME_1;
88 result = prime * result + ((setValue == null) ? 0 : setValue.hashCode());
95 * @see java.lang.Object#equals(java.lang.Object)
98 public boolean equals(final Object obj) {
105 if (getClass() != obj.getClass()) {
108 final TestContextTreeSetItem other = (TestContextTreeSetItem) obj;
109 if (setValue == null) {
110 if (other.setValue != null) {
113 } else if (!setValue.equals(other.setValue)) {
122 * @see java.lang.Object#toString()
125 public String toString() {
126 return "TestContextItem00B [setValue=" + setValue + "]";