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) {
33 if (o == null || getClass() != o.getClass())
36 Dependency that = (Dependency) o;
38 if (mandatory != that.mandatory)
40 if (!sie.equals(that.sie))
47 public int hashCode() {
48 int result = sie.hashCode();
49 result = 31 * result + (mandatory ? 1 : 0);