1 package org.simantics.db.layer0.variable;
3 import org.simantics.db.Resource;
5 public class ModelledVariablePropertyDescriptorImpl implements ModelledVariablePropertyDescriptor {
6 final private Variable variable;
7 final private Resource subject;
8 final private Resource property;
9 public ModelledVariablePropertyDescriptorImpl(Variable variable, Resource subject, Resource property) {
10 this.variable = variable;
11 this.subject = subject;
12 this.property = property;
14 public Variable getVariable() {
17 public Resource getSubject() {
20 public Resource getProperty() {
24 public int hashCode() {
25 return subject.hashCode() ^ 31*property.hashCode() ^ 41*variable.hashCode();
28 public boolean equals(Object obj) {
29 if(this == obj) return true;
30 if(!(obj instanceof ModelledVariablePropertyDescriptorImpl)) return false;
31 ModelledVariablePropertyDescriptorImpl other = (ModelledVariablePropertyDescriptorImpl)obj;
32 if(!subject.equals(other.subject)) return false;
33 if(!property.equals(other.property)) return false;
34 return variable.equals(other.variable);