]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableX.java
VariableOrResource SCL type
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / variable / VariableX.java
diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableX.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableX.java
new file mode 100644 (file)
index 0000000..8286abb
--- /dev/null
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2019 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.db.layer0.variable;
+
+public class VariableX implements VariableOrResource {
+    
+    public final Variable value;
+
+    public VariableX(Variable value) {
+        this.value = value;
+    }
+    
+    @Override
+    public String toString() {
+        return "VariableX " + value;
+    }
+    
+    @Override
+    public boolean equals(Object obj) {
+        if(this == obj)
+            return true;
+        if(obj == null || obj.getClass() != getClass())
+            return false;
+        VariableX other = (VariableX)obj;
+        return value == null ? other.value == null : value.equals(other.value);
+    }
+    
+    @Override
+    public int hashCode() {
+        return 31 * (value == null ? 0 : value.hashCode()) + 13532;
+    }
+    
+}