Added hashcode/equals methods to generic profile Group implementations
[simantics/platform.git] / bundles / org.simantics.modeling.template2d.ui / src / org / simantics / modeling / template2d / ui / diagram / adapter / DiagramGroup.java
index 8b19fd8e4f2d82c9705ab9856c03134bd621f2c6..3c2756a668723d7de6fe8e3b6350ebadf936ad55 100644 (file)
@@ -20,7 +20,8 @@ import org.simantics.scenegraph.profile.Group;
  * @author Tuukka Lehtonen
  */
 public class DiagramGroup implements Group {
-
+    
+    
     @Override
     public String toString() {
         return "diagram";
@@ -30,6 +31,16 @@ public class DiagramGroup implements Group {
        public void trackItems(RequestProcessor processor, Resource runtimeDiagram, SetListener<Resource> listener) {
                listener.add(runtimeDiagram);
        }
+       
+    @Override
+    public int hashCode() {
+        return this.getClass().hashCode();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj.getClass().equals(this.getClass());
+    }
 
 }