]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/TypeGroup.java
Fix diagram profiles to work with latest DB changes
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / adapter / TypeGroup.java
index e025fb2ddf16927783a2fc353817b87c9c068155..522c0b9d5b73661051370fa6cecdb446ffe656a5 100644 (file)
@@ -47,6 +47,31 @@ public class TypeGroup implements Group {
         this.name = name;
     }
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((types == null) ? 0 : types.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        TypeGroup other = (TypeGroup) obj;
+        if (types == null) {
+            if (other.types != null)
+                return false;
+        } else if (!types.equals(other.types))
+            return false;
+        return true;
+    }
+
     /**
      * Initialize TypeGroup from a DIAGRAM.Group instance.
      *