2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2020 AT&T Intellectual Property. All rights
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END============================================
20 * ===================================================================
24 package org.onap.clamp.policy.pdpgroup;
26 import com.google.gson.annotations.Expose;
28 import java.io.Serializable;
30 public class PolicyModelKey implements Serializable {
33 * The serial version ID.
35 private static final long serialVersionUID = 3307410842013230886L;
41 private String version;
46 public PolicyModelKey(String name, String version) {
48 this.version = version;
56 public String getName() {
63 * @param name the name to set
65 public void setName(String name) {
74 public String getVersion() {
81 * @param version the version to set
83 public void setVersion(String version) {
84 this.version = version;
88 public int hashCode() {
91 result = prime * result + ((name == null) ? 0 : name.hashCode());
92 result = prime * result + ((version == null) ? 0 : version.hashCode());
97 public boolean equals(Object obj) {
104 if (getClass() != obj.getClass()) {
107 PolicyModelKey other = (PolicyModelKey) obj;
109 if (other.name != null) {
112 } else if (!name.equals(other.name)) {
113 if (!name.matches(other.name)) {
117 if (version == null) {
118 if (other.version != null) {
121 } else if (!version.equals(other.version)) {