]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/scl/CompileResourceValueRequest.java
Add hashCode and equals to AbstractExpressionCompilationRequest
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / scl / CompileResourceValueRequest.java
index e56c3d5cef0bf33b02be0a7a723cdf9c80c63064..cdc787d2683a135985244b31414379a0ac45d791 100644 (file)
@@ -110,4 +110,30 @@ public class CompileResourceValueRequest extends AbstractExpressionCompilationRe
             return null;
     }
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((literal == null) ? 0 : literal.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;
+        CompileResourceValueRequest other = (CompileResourceValueRequest) obj;
+        if (literal == null) {
+            if (other.literal != null)
+                return false;
+        } else if (!literal.equals(other.literal))
+            return false;
+        return true;
+    }
+
+    
 }