]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Switch MapList to use Java HashMap 38/2038/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 27 Aug 2018 21:17:48 +0000 (00:17 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 27 Aug 2018 21:17:48 +0000 (00:17 +0300)
Java HashMap is more efficient than Trove THashMap already in JDK 8.

gitlab #89

Change-Id: I9eb9be8a513ad1cd90b8f6f4a45aca99bba9234b

bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/MapList.java

index 900c4b7015dcf6a84b1346939f5902fffffc94e6..cdfa9f7829ddbfb4065d95f9c4ef27cf774e306d 100644 (file)
  */
 package org.simantics.utils.datastructures;
 
-import gnu.trove.map.hash.THashMap;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -73,7 +72,7 @@ public class MapList<L, R> {
     protected Map<L, List<R>> lists;
 
     public MapList() {
-       lists = new THashMap<L, List<R>>();
+       lists = new HashMap<L, List<R>>();
     }
     
     @SuppressWarnings("unchecked")