Override equals() method in GraphRelation.java
Issue-ID: SDC-1895
Change-Id: Ib6538043f81173336c30d6a97545ef036431c79f
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.builder.EqualsBuilder;
public class GraphRelation extends GraphElement {
result = prime * result + ((type == null) ? 0 : type.hashCode());
return result;
}
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+
+ if (obj == null)
+ return false;
+
+ if (!(obj instanceof GraphRelation)) {
+ return false;
+ }
+
+ GraphRelation other = (GraphRelation) obj;
+
+ return new EqualsBuilder().append(from, other.from).append(properties, other.properties).append(to, other.to).append(type, other.type).isEquals();
+ }
}