X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FModelledVariablePropertyDescriptorImpl.java;h=9deb3e4a7b94d23163ebad02eb34a02b12587783;hb=3c17e1a55c108f120808016dd5e4d3893c29c0e8;hp=ebb0690d0bbcfa2fcf4f2d5c4c7b21448dd92248;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ModelledVariablePropertyDescriptorImpl.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ModelledVariablePropertyDescriptorImpl.java index ebb0690d0..9deb3e4a7 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ModelledVariablePropertyDescriptorImpl.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/ModelledVariablePropertyDescriptorImpl.java @@ -1,36 +1,36 @@ -package org.simantics.db.layer0.variable; - -import org.simantics.db.Resource; - -public class ModelledVariablePropertyDescriptorImpl implements ModelledVariablePropertyDescriptor { - final private Variable variable; - final private Resource subject; - final private Resource property; - public ModelledVariablePropertyDescriptorImpl(Variable variable, Resource subject, Resource property) { - this.variable = variable; - this.subject = subject; - this.property = property; - } - public Variable getVariable() { - return variable; - } - public Resource getSubject() { - return subject; - } - public Resource getProperty() { - return property; - } - @Override - public int hashCode() { - return subject.hashCode() ^ 31*property.hashCode() ^ 41*variable.hashCode(); - } - @Override - public boolean equals(Object obj) { - if(this == obj) return true; - if(!(obj instanceof ModelledVariablePropertyDescriptorImpl)) return false; - ModelledVariablePropertyDescriptorImpl other = (ModelledVariablePropertyDescriptorImpl)obj; - if(!subject.equals(other.subject)) return false; - if(!property.equals(other.property)) return false; - return variable.equals(other.variable); - } -} +package org.simantics.db.layer0.variable; + +import org.simantics.db.Resource; + +public class ModelledVariablePropertyDescriptorImpl implements ModelledVariablePropertyDescriptor { + final private Variable variable; + final private Resource subject; + final private Resource property; + public ModelledVariablePropertyDescriptorImpl(Variable variable, Resource subject, Resource property) { + this.variable = variable; + this.subject = subject; + this.property = property; + } + public Variable getVariable() { + return variable; + } + public Resource getSubject() { + return subject; + } + public Resource getProperty() { + return property; + } + @Override + public int hashCode() { + return subject.hashCode() ^ 31*property.hashCode() ^ 41*variable.hashCode(); + } + @Override + public boolean equals(Object obj) { + if(this == obj) return true; + if(!(obj instanceof ModelledVariablePropertyDescriptorImpl)) return false; + ModelledVariablePropertyDescriptorImpl other = (ModelledVariablePropertyDescriptorImpl)obj; + if(!subject.equals(other.subject)) return false; + if(!property.equals(other.property)) return false; + return variable.equals(other.variable); + } +}