Merge "Parents pom distribution"
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / topology / TopoEdgeUpdate.java
index d8da9c301bb17d0c62848ec29baccfc9ee4edfc7..58bf350c40e015878cad1ae01f9de3ca9e7f7596 100644 (file)
@@ -10,9 +10,6 @@ package org.opendaylight.controller.sal.topology;
 
 import java.util.Set;
 
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
 import org.opendaylight.controller.sal.core.Edge;
 import org.opendaylight.controller.sal.core.Property;
 import org.opendaylight.controller.sal.core.UpdateType;
@@ -46,17 +43,41 @@ public class TopoEdgeUpdate {
 
     @Override
     public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((edge == null) ? 0 : edge.hashCode());
+        result = prime * result + ((props == null) ? 0 : props.hashCode());
+        result = prime * result + ((type == null) ? 0 : type.hashCode());
+        return result;
     }
 
     @Override
     public String toString() {
-        return "TopoEdgeUpdate[" + ReflectionToStringBuilder.toString(this)
-                + "]";
+        return "TopoEdgeUpdate [edge=" + edge + ", props=" + props + ", type="
+                + type + "]";
     }
 
     @Override
     public boolean equals(Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        TopoEdgeUpdate other = (TopoEdgeUpdate) obj;
+        if (edge == null) {
+            if (other.edge != null)
+                return false;
+        } else if (!edge.equals(other.edge))
+            return false;
+        if (props == null) {
+            if (other.props != null)
+                return false;
+        } else if (!props.equals(other.props))
+            return false;
+        if (type != other.type)
+            return false;
+        return true;
     }
 }