]> gerrit.simantics Code Review - simantics/platform.git/blob - SkeletonKeyMap.java
ecc9c026a2e0792ef632c29bf6ede17ecd381f72
[simantics/platform.git] / 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 }