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=========================================================
21 package org.onap.policy.controlloop.policy;
23 import java.util.List;
25 public class ControlLoopPolicy {
27 private ControlLoop controlLoop;
29 private List<Policy> policies;
31 public ControlLoop getControlLoop() {
35 public void setControlLoop(ControlLoop controlLoop) {
36 this.controlLoop = controlLoop;
39 public List<Policy> getPolicies() {
43 public void setPolicies(List<Policy> policies) {
44 this.policies = policies;
48 public String toString() {
49 return "ControlLoopPolicy [controlLoop=" + controlLoop + ", policies=" + policies + "]";
53 public int hashCode() {
56 result = prime * result + ((controlLoop == null) ? 0 : controlLoop.hashCode());
57 result = prime * result + ((policies == null) ? 0 : policies.hashCode());
62 public boolean equals(Object obj) {
67 if (getClass() != obj.getClass())
69 ControlLoopPolicy other = (ControlLoopPolicy) obj;
70 if (controlLoop == null) {
71 if (other.controlLoop != null)
73 } else if (!controlLoop.equals(other.controlLoop))
75 if (policies == null) {
76 if (other.policies != null)
78 } else if (!policies.equals(other.policies))