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