Prune change sets during token prop by beta info only, not whether the rule was applied
[IRC.git] / Robust / src / Analysis / OwnershipAnalysis / HeapRegionNode.java
index 237f2a51bbd2ee2f847e8eda5f4a372f7b141732..fdbe1fa9b69287b8d4ae7b88b5e0bab9161dc683 100644 (file)
@@ -62,8 +62,13 @@ public class HeapRegionNode extends OwnershipNode {
     }
 
 
-    public boolean equals( HeapRegionNode hrn ) {
-       assert hrn != null;
+    public boolean equals( Object o ) {
+
+       if( !( o instanceof HeapRegionNode) ) {
+           return false;
+       }
+
+       HeapRegionNode hrn = (HeapRegionNode) o;
 
        return id.equals( hrn.getID() )            &&
            isSingleObject == hrn.isSingleObject() &&
@@ -73,6 +78,10 @@ public class HeapRegionNode extends OwnershipNode {
            description.equals( hrn.getDescription() );
     }
 
+    public int hashCode() {
+       return id.intValue();
+    }
+
 
 
     public boolean isSingleObject() {