|
@@ -26,6 +26,7 @@ import haxe.ds.HashMap;
|
|
import haxe.ds.ObjectMap;
|
|
import haxe.ds.ObjectMap;
|
|
import haxe.ds.WeakMap;
|
|
import haxe.ds.WeakMap;
|
|
import haxe.ds.EnumValueMap;
|
|
import haxe.ds.EnumValueMap;
|
|
|
|
+import haxe.Constraints.IMap;
|
|
|
|
|
|
/**
|
|
/**
|
|
Map allows key to value mapping for arbitrary value types, and many key
|
|
Map allows key to value mapping for arbitrary value types, and many key
|
|
@@ -160,18 +161,4 @@ abstract Map<K,V>(IMap<K,V> ) {
|
|
@:from static inline function fromObjectMap<K:{ }, V>(map:ObjectMap<K,V>):Map<K,V> {
|
|
@:from static inline function fromObjectMap<K:{ }, V>(map:ObjectMap<K,V>):Map<K,V> {
|
|
return cast map;
|
|
return cast map;
|
|
}
|
|
}
|
|
-}
|
|
|
|
-
|
|
|
|
-interface IMap<K,V> {
|
|
|
|
- public function get(k:K):Null<V>;
|
|
|
|
- public function set(k:K, v:V):Void;
|
|
|
|
- public function exists(k:K):Bool;
|
|
|
|
- public function remove(k:K):Bool;
|
|
|
|
- public function keys():Iterator<K>;
|
|
|
|
- public function iterator():Iterator<V>;
|
|
|
|
- public function toString():String;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-private typedef Hashable = {
|
|
|
|
- function hashCode():Int;
|
|
|
|
-}
|
|
|
|
|
|
+}
|