import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.simantics.scl.compiler.constants.Constant;
import org.simantics.scl.compiler.elaboration.chr.CHRRuleset;
public abstract class LazyModule implements Module {
- String moduleName;
- private THashMap<String, SCLValue> values = new THashMap<String, SCLValue>();
- private THashMap<String, SCLRelation> relations = new THashMap<String, SCLRelation>();
- private THashMap<String, SCLEntityType> entityTypes = new THashMap<String, SCLEntityType>();
+ private final String moduleName;
+ private final Map<String, SCLValue> values = Collections.synchronizedMap(new HashMap<String, SCLValue>());
+ private final Map<String, SCLRelation> relations = Collections.synchronizedMap(new HashMap<String, SCLRelation>());
+ private final Map<String, SCLEntityType> entityTypes = Collections.synchronizedMap(new HashMap<String, SCLEntityType>());
protected abstract SCLValue createValue(String name);