2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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=========================================================
22 package org.openecomp.appc.metadata.objects;
25 public class DependencyModelIdentifier {
26 private String vnfType;
27 private String catalogVersion;
29 public DependencyModelIdentifier(String vnfType, String catalogVersion){
30 this.vnfType = vnfType;
31 this.catalogVersion = catalogVersion;
34 public int hashCode(){
37 result = result * prime + (this.vnfType == null ? 0 :this.vnfType.hashCode());
38 result = result * prime + (this.catalogVersion == null ? 0 :this.catalogVersion.hashCode());
42 public boolean equals(Object obj){
45 if(!(obj instanceof DependencyModelIdentifier))
48 DependencyModelIdentifier modelIdentifier = (DependencyModelIdentifier)obj;
49 if(this.vnfType == null){
50 if(modelIdentifier.vnfType !=null)
53 else if(!this.vnfType.equals(modelIdentifier.vnfType))
56 if(this.catalogVersion == null){
57 if(modelIdentifier.catalogVersion !=null)
60 else if(!this.catalogVersion.equals(modelIdentifier.catalogVersion))
67 public String toString() {
68 return "DependencyModelIdentifier : vnfType = "+vnfType + " , catalogVersion = " +catalogVersion;
71 public String getVnfType() {
75 public String getCatalogVersion() {
76 return catalogVersion;