-package org.simantics.modeling;\r
-\r
-import java.util.List;\r
-import java.util.Set;\r
-\r
-import org.simantics.scl.compiler.errors.CompilationError;\r
-\r
-public class ComponentTypeScriptResult {\r
-\r
- private List<CompilationError> errors;\r
- private Object value;\r
-\r
- private Set<String> moduleReads;\r
- private Set<String> moduleWrites;\r
- \r
- public ComponentTypeScriptResult(List<CompilationError> errors, Object value) {\r
- this(errors, value, null, null);\r
- }\r
- \r
- public ComponentTypeScriptResult(List<CompilationError> errors, Object value, Set<String> moduleReads, Set<String> moduleWrites) {\r
- this.errors = errors;\r
- this.value = value;\r
- this.moduleReads = moduleReads;\r
- this.moduleWrites = moduleWrites;\r
- }\r
- \r
- public List<CompilationError> getErrors() {\r
- return errors;\r
- }\r
- \r
- public Object getValue() {\r
- return value;\r
- }\r
- \r
- public Set<String> getModuleReads() {\r
- return moduleReads;\r
- }\r
- \r
- public Set<String> getModuleWrites() {\r
- return moduleWrites;\r
- }\r
- \r
- @Override\r
- public int hashCode() {\r
- final int prime = 31;\r
- int result = 1;\r
- result = prime * result + ((errors == null) ? 0 : errors.hashCode());\r
- result = prime * result\r
- + ((moduleReads == null) ? 0 : moduleReads.hashCode());\r
- result = prime * result\r
- + ((moduleWrites == null) ? 0 : moduleWrites.hashCode());\r
- result = prime * result + ((value == null) ? 0 : value.hashCode());\r
- return result;\r
- }\r
-\r
- @Override\r
- public boolean equals(Object obj) {\r
- if (this == obj)\r
- return true;\r
- if (obj == null)\r
- return false;\r
- if (getClass() != obj.getClass())\r
- return false;\r
- ComponentTypeScriptResult other = (ComponentTypeScriptResult) obj;\r
- if (errors == null) {\r
- if (other.errors != null)\r
- return false;\r
- } else if (!errors.equals(other.errors))\r
- return false;\r
- if (moduleReads == null) {\r
- if (other.moduleReads != null)\r
- return false;\r
- } else if (!moduleReads.equals(other.moduleReads))\r
- return false;\r
- if (moduleWrites == null) {\r
- if (other.moduleWrites != null)\r
- return false;\r
- } else if (!moduleWrites.equals(other.moduleWrites))\r
- return false;\r
- if (value == null) {\r
- if (other.value != null)\r
- return false;\r
- } else if (!value.equals(other.value))\r
- return false;\r
- return true;\r
- }\r
-\r
-}\r
+package org.simantics.modeling;
+
+import java.util.List;
+import java.util.Set;
+
+import org.simantics.scl.compiler.errors.CompilationError;
+
+public class ComponentTypeScriptResult {
+
+ private List<CompilationError> errors;
+ private Object value;
+
+ private Set<String> moduleReads;
+ private Set<String> moduleWrites;
+
+ public ComponentTypeScriptResult(List<CompilationError> errors, Object value) {
+ this(errors, value, null, null);
+ }
+
+ public ComponentTypeScriptResult(List<CompilationError> errors, Object value, Set<String> moduleReads, Set<String> moduleWrites) {
+ this.errors = errors;
+ this.value = value;
+ this.moduleReads = moduleReads;
+ this.moduleWrites = moduleWrites;
+ }
+
+ public List<CompilationError> getErrors() {
+ return errors;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Set<String> getModuleReads() {
+ return moduleReads;
+ }
+
+ public Set<String> 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;
+ }
+
+}