-import "StandardLibrary" hiding (contains)
+module {
+ deprecated = "Use module MMap instead."
+}
-importJava "gnu.trove.map.hash.THashMap" where
- data T a b
-
- @JavaName "<init>"
- create :: () -> <Proc> T a b
- put :: T a b -> a -> b -> <Proc> Maybe b
- get :: T a b -> a -> <Proc> Maybe b
- @JavaName get
- unsafeGet :: T a b -> a -> <Proc> b
+import "MMap" as MMap
+
+type T = MMap.T
+
+create :: () -> <Proc> T a b
+create = MMap.create
+
+put :: T a b -> a -> b -> <Proc> Maybe b
+put = MMap.put
+
+get :: T a b -> a -> <Proc> Maybe b
+get = MMap.get
+
+unsafeGet :: T a b -> a -> <Proc> b
+unsafeGet = MMap.unsafeGet
- contains :: T a b -> a -> <Proc> Boolean
- size :: T a b -> <Proc> Integer
+contains :: T a b -> a -> <Proc> Boolean
+contains = MMap.containsKey
+
+size :: T a b -> <Proc> Integer
+size = MMap.size
-importJava "org.simantics.scl.osgi.map.HashMapUtils" where
- entries :: T a b -> <Proc> [(a,b)]
+entries :: T a b -> <Proc> [(a,b)]
+entries = MMap.entries
fromList :: [(a,b)] -> <Proc> T a b
-fromList entries = do
- result = create ()
- for entries (\(k,v) -> do put result k v; ())
- result
\ No newline at end of file
+fromList = MMap.fromEntryList