|
@@ -11,13 +11,17 @@ typedef IMap < K, V > = {
|
|
|
abstract Map(IMap < K, V > )<K,V> {
|
|
|
public function new();
|
|
|
|
|
|
- @:to static inline public function toHash(t:IMap < String, V > ):Hash<V> {
|
|
|
+ @:to static inline function toHash(t:IMap < String, V > ):Hash<V> {
|
|
|
return new Hash<V>();
|
|
|
}
|
|
|
|
|
|
- @:to static inline public function toIntHash(t:IMap < Int, V > ):haxe.ds.IntMap<V> {
|
|
|
+ @:to static inline function toIntHash(t:IMap < Int, V > ):haxe.ds.IntMap<V> {
|
|
|
return new haxe.ds.IntMap<V>();
|
|
|
}
|
|
|
+
|
|
|
+ @:to static inline function toHashMap<K:{ function hashCode():Int; }>(t:IMap < K, V >):haxe.ds.HashMap<K,V> {
|
|
|
+ return new haxe.ds.HashMap<K, V>();
|
|
|
+ }
|
|
|
|
|
|
public inline function set(k:K, v:V) this.set(k, v)
|
|
|
public inline function get(k:K) return this.get(k)
|