]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/util/SkeletonKeyMap.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / util / SkeletonKeyMap.java
1 package org.simantics.scl.compiler.types.util;
2
3 import org.simantics.scl.compiler.types.Skeletons;
4 import org.simantics.scl.compiler.types.Type;
5
6 import gnu.trove.map.hash.THashMap;
7
8 public class SkeletonKeyMap<T> extends THashMap<Type,T> {
9     @Override
10     protected int hash(Object notnull) {
11         return ((Type)notnull).hashCode();
12     }
13     
14     @Override
15     protected boolean equals(Object notnull, Object two) {
16         return Skeletons.equalSkeletons((Type)notnull, (Type)two);
17     }
18 }