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
9 package org.opendaylight.controller.sal.topology;
13 import org.opendaylight.controller.sal.core.Edge;
14 import org.opendaylight.controller.sal.core.Property;
15 import org.opendaylight.controller.sal.core.UpdateType;
18 * The class represents an Edge, the Edge's Property Set and its UpdateType.
21 public class TopoEdgeUpdate {
23 private Set<Property> props;
24 private UpdateType type;
26 public TopoEdgeUpdate(Edge e, Set<Property> p, UpdateType t) {
32 public Edge getEdge() {
36 public Set<Property> getProperty() {
40 public UpdateType getUpdateType() {
45 public int hashCode() {
48 result = prime * result + ((edge == null) ? 0 : edge.hashCode());
49 result = prime * result + ((props == null) ? 0 : props.hashCode());
50 result = prime * result + ((type == null) ? 0 : type.hashCode());
55 public String toString() {
56 return "TopoEdgeUpdate [edge=" + edge + ", props=" + props + ", type="
61 public boolean equals(Object obj) {
66 if (getClass() != obj.getClass())
68 TopoEdgeUpdate other = (TopoEdgeUpdate) obj;
70 if (other.edge != null)
72 } else if (!edge.equals(other.edge))
75 if (other.props != null)
77 } else if (!props.equals(other.props))
79 if (type != other.type)