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