X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fadapter%2FTypeGroup.java;h=522c0b9d5b73661051370fa6cecdb446ffe656a5;hb=6cc84e9fd4fb1bf95a20538aeca2cae9b8325968;hp=e025fb2ddf16927783a2fc353817b87c9c068155;hpb=6c70e409e03187c96b057aa5705d49800c6b8b07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/TypeGroup.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/TypeGroup.java index e025fb2dd..522c0b9d5 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/TypeGroup.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/TypeGroup.java @@ -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. *