2 * ============LICENSE_START=======================================================
3 * Copyright © 2016-2018 European Support Limited
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.
16 * ============LICENSE_END=========================================================
17 * Modifications copyright (c) 2019 Nokia
18 * ================================================================================
21 package org.openecomp.sdc.vendorsoftwareproduct.types.composition;
23 import java.util.Objects;
25 public class ComponentData implements CompositionDataEntity {
27 private String description;
28 private String displayName;
30 public String getName() {
34 public void setName(String name) {
38 public String getDescription() {
42 public void setDescription(String description) {
43 this.description = description;
46 public String getDisplayName() {
50 public void setDisplayName(String displayName) {
51 this.displayName = displayName;
55 public int hashCode() {
56 int result = name != null ? name.hashCode() : 0;
57 result = 31 * result + (description != null ? description.hashCode() : 0);
58 result = 31 * result + (displayName != null ? displayName.hashCode() : 0);
63 public boolean equals(Object object) {
67 if (!(object instanceof ComponentData)) {
71 ComponentData that = (ComponentData) object;
73 if (!Objects.equals(name, that.name)) {
76 if (description != null ? !description.equals(that.description) : that.description != null) {
79 return displayName != null ? displayName.equals(that.displayName) : that.displayName == null;