2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.config.yangjmxgenerator.attribute;
10 import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry;
12 public class Dependency {
13 private final ServiceInterfaceEntry sie;
14 private final boolean mandatory;
16 public Dependency(ServiceInterfaceEntry sie, boolean mandatory) {
18 this.mandatory = mandatory;
21 public ServiceInterfaceEntry getSie() {
25 public boolean isMandatory() {
30 public boolean equals(Object o) {
34 if (o == null || getClass() != o.getClass()) {
38 Dependency that = (Dependency) o;
40 if (mandatory != that.mandatory) {
43 if (!sie.equals(that.sie)) {
51 public int hashCode() {
52 int result = sie.hashCode();
53 result = 31 * result + (mandatory ? 1 : 0);