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.apache.commons.lang3.builder.ReflectionToStringBuilder;
14 import org.opendaylight.controller.sal.core.Edge;
15 import org.opendaylight.controller.sal.core.Property;
16 import org.opendaylight.controller.sal.core.UpdateType;
19 * The class represents an Edge, the Edge's Property Set and its UpdateType.
22 public class TopoEdgeUpdate {
24 private Set<Property> props;
25 private UpdateType type;
27 public TopoEdgeUpdate(Edge e, Set<Property> p, UpdateType t) {
33 public Edge getEdge() {
37 public Set<Property> getProperty() {
41 public UpdateType getUpdateType() {
46 public int hashCode() {
49 result = prime * result + ((edge == null) ? 0 : edge.hashCode());
50 result = prime * result + ((props == null) ? 0 : props.hashCode());
51 result = prime * result + ((type == null) ? 0 : type.hashCode());
56 public String toString() {
57 return "TopoEdgeUpdate[" + ReflectionToStringBuilder.toString(this)
62 public boolean equals(Object obj) {
67 if (getClass() != obj.getClass())
69 TopoEdgeUpdate other = (TopoEdgeUpdate) obj;
71 if (other.edge != null)
73 } else if (!edge.equals(other.edge))
76 if (other.props != null)
78 } else if (!props.equals(other.props))
80 if (type != other.type)