2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.onap.policy.controlloop.policy.guard;
22 public class ControlLoopParameter {
23 private String controlLoopName;
24 private String version;
26 public String getControlLoopName() {
27 return controlLoopName;
30 public void setControlLoopName(String controlLoopName) {
31 this.controlLoopName = controlLoopName;
34 public String getVersion() {
38 public void setVersion(String version) {
39 this.version = version;
42 public ControlLoopParameter(String controlLoopName, String version) {
44 this.controlLoopName = controlLoopName;
45 this.version = version;
48 public ControlLoopParameter(ControlLoopParameter cl) {
50 this.controlLoopName = cl.controlLoopName;
51 this.version = cl.version;
55 public String toString() {
56 return "ControlLoopParameter [controlLoopName=" + controlLoopName + ", version=" + version + "]";
60 public int hashCode() {
63 result = prime * result + ((controlLoopName == null) ? 0 : controlLoopName.hashCode());
64 result = prime * result + ((version == null) ? 0 : version.hashCode());
69 public boolean equals(Object obj) {
74 if (getClass() != obj.getClass())
76 ControlLoopParameter other = (ControlLoopParameter) obj;
77 if (controlLoopName == null) {
78 if (other.controlLoopName != null)
80 } else if (!controlLoopName.equals(other.controlLoopName))
82 if (version == null) {
83 if (other.version != null)
85 } else if (!version.equals(other.version))