]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/VariableX.java
Playground for Antti.
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / variable / VariableX.java
1 package org.simantics.db.layer0.variable;
2
3 public class VariableX implements VariableOrResource {
4     
5     public final Variable value;
6
7     public VariableX(Variable value) {
8         this.value = value;
9     }
10     
11     @Override
12     public String toString() {
13         return "VariableX " + value;
14     }
15     
16     @Override
17     public boolean equals(Object obj) {
18         if(this == obj)
19             return true;
20         if(obj == null || obj.getClass() != getClass())
21             return false;
22         VariableX other = (VariableX)obj;
23         return value == null ? other.value == null : value.equals(other.value);
24     }
25     
26     @Override
27     public int hashCode() {
28         return 31 * (value == null ? 0 : value.hashCode()) + 13532;
29     }
30     
31 }