X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2FComponentTypeScriptResult.java;h=fd2a0bd1d35c82fad8f6c842832188d55e11c347;hb=76061fee3ffb1b66ed4d78ce711ab44f38b7ffdf;hp=759411c075150407d7a22b08740c4dee68c99edc;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/ComponentTypeScriptResult.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/ComponentTypeScriptResult.java index 759411c07..fd2a0bd1d 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/ComponentTypeScriptResult.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/ComponentTypeScriptResult.java @@ -1,88 +1,88 @@ -package org.simantics.modeling; - -import java.util.List; -import java.util.Set; - -import org.simantics.scl.compiler.errors.CompilationError; - -public class ComponentTypeScriptResult { - - private List errors; - private Object value; - - private Set moduleReads; - private Set moduleWrites; - - public ComponentTypeScriptResult(List errors, Object value) { - this(errors, value, null, null); - } - - public ComponentTypeScriptResult(List errors, Object value, Set moduleReads, Set moduleWrites) { - this.errors = errors; - this.value = value; - this.moduleReads = moduleReads; - this.moduleWrites = moduleWrites; - } - - public List getErrors() { - return errors; - } - - public Object getValue() { - return value; - } - - public Set getModuleReads() { - return moduleReads; - } - - public Set getModuleWrites() { - return moduleWrites; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((errors == null) ? 0 : errors.hashCode()); - result = prime * result - + ((moduleReads == null) ? 0 : moduleReads.hashCode()); - result = prime * result - + ((moduleWrites == null) ? 0 : moduleWrites.hashCode()); - result = prime * result + ((value == null) ? 0 : value.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - ComponentTypeScriptResult other = (ComponentTypeScriptResult) obj; - if (errors == null) { - if (other.errors != null) - return false; - } else if (!errors.equals(other.errors)) - return false; - if (moduleReads == null) { - if (other.moduleReads != null) - return false; - } else if (!moduleReads.equals(other.moduleReads)) - return false; - if (moduleWrites == null) { - if (other.moduleWrites != null) - return false; - } else if (!moduleWrites.equals(other.moduleWrites)) - return false; - if (value == null) { - if (other.value != null) - return false; - } else if (!value.equals(other.value)) - return false; - return true; - } - -} +package org.simantics.modeling; + +import java.util.List; +import java.util.Set; + +import org.simantics.scl.compiler.errors.CompilationError; + +public class ComponentTypeScriptResult { + + private List errors; + private Object value; + + private Set moduleReads; + private Set moduleWrites; + + public ComponentTypeScriptResult(List errors, Object value) { + this(errors, value, null, null); + } + + public ComponentTypeScriptResult(List errors, Object value, Set moduleReads, Set moduleWrites) { + this.errors = errors; + this.value = value; + this.moduleReads = moduleReads; + this.moduleWrites = moduleWrites; + } + + public List getErrors() { + return errors; + } + + public Object getValue() { + return value; + } + + public Set getModuleReads() { + return moduleReads; + } + + public Set getModuleWrites() { + return moduleWrites; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((errors == null) ? 0 : errors.hashCode()); + result = prime * result + + ((moduleReads == null) ? 0 : moduleReads.hashCode()); + result = prime * result + + ((moduleWrites == null) ? 0 : moduleWrites.hashCode()); + result = prime * result + ((value == null) ? 0 : value.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ComponentTypeScriptResult other = (ComponentTypeScriptResult) obj; + if (errors == null) { + if (other.errors != null) + return false; + } else if (!errors.equals(other.errors)) + return false; + if (moduleReads == null) { + if (other.moduleReads != null) + return false; + } else if (!moduleReads.equals(other.moduleReads)) + return false; + if (moduleWrites == null) { + if (other.moduleWrites != null) + return false; + } else if (!moduleWrites.equals(other.moduleWrites)) + return false; + if (value == null) { + if (other.value != null) + return false; + } else if (!value.equals(other.value)) + return false; + return true; + } + +}