Browse Source

[cs/java] Changed type parameter T to V. fixed issue #1558

Caue Waneck 12 years ago
parent
commit
de26fd36e8
2 changed files with 12 additions and 12 deletions
  1. 6 6
      std/cs/_std/haxe/ds/ObjectMap.hx
  2. 6 6
      std/java/_std/haxe/ds/ObjectMap.hx

+ 6 - 6
std/cs/_std/haxe/ds/ObjectMap.hx

@@ -23,7 +23,7 @@ package haxe.ds;
 
 import cs.NativeArray;
 
-@:coreApi class ObjectMap<K, T>
+@:coreApi class ObjectMap<K, V>
 {
 	@:extern private static inline var HASH_UPPER = 0.77;
 	@:extern private static inline var FLAG_EMPTY = 0;
@@ -39,7 +39,7 @@ import cs.NativeArray;
 	 */
 	private var hashes:NativeArray<HashType>;
 	private var _keys:NativeArray<K>;
-	private var vals:NativeArray<T>;
+	private var vals:NativeArray<V>;
 
 	private var nBuckets:Int;
 	private var size:Int;
@@ -61,7 +61,7 @@ import cs.NativeArray;
 		cachedIndex = -1;
 	}
 
-	public function set( key : K, value : T ) : Void
+	public function set( key : K, value : V ) : Void
 	{
 		var x:Int, k:Int;
 		if (nOccupied >= upperBound)
@@ -260,7 +260,7 @@ import cs.NativeArray;
 		}
 	}
 
-	public function get( key : K ) : Null<T>
+	public function get( key : K ) : Null<V>
 	{
 		var idx = -1;
 		if (cachedKey == key && ( (idx = cachedIndex) != -1 ))
@@ -280,7 +280,7 @@ import cs.NativeArray;
 		return null;
 	}
 
-	private function getDefault( key : K, def : T ) : T
+	private function getDefault( key : K, def : V ) : V
 	{
 		var idx = -1;
 		if (cachedKey == key && ( (idx = cachedIndex) != -1 ))
@@ -379,7 +379,7 @@ import cs.NativeArray;
 		Returns an iterator of all values in the hashtable.
 		Implementation detail: Do not set() any new value while iterating, as it may cause a resize, which will break iteration
 	**/
-	public function iterator() : Iterator<T>
+	public function iterator() : Iterator<V>
 	{
 		var i = 0;
 		var len = nBuckets;

+ 6 - 6
std/java/_std/haxe/ds/ObjectMap.hx

@@ -23,7 +23,7 @@ package haxe.ds;
 
 import java.NativeArray;
 
-@:coreApi class ObjectMap<K, T>
+@:coreApi class ObjectMap<K, V>
 {
 	@:extern private static inline var HASH_UPPER = 0.77;
 	@:extern private static inline var FLAG_EMPTY = 0;
@@ -39,7 +39,7 @@ import java.NativeArray;
 	 */
 	private var hashes:NativeArray<HashType>;
 	private var _keys:NativeArray<K>;
-	private var vals:NativeArray<T>;
+	private var vals:NativeArray<V>;
 
 	private var nBuckets:Int;
 	private var size:Int;
@@ -61,7 +61,7 @@ import java.NativeArray;
 		cachedIndex = -1;
 	}
 
-	public function set( key : K, value : T ) : Void
+	public function set( key : K, value : V ) : Void
 	{
 		var x:Int, k:Int;
 		if (nOccupied >= upperBound)
@@ -260,7 +260,7 @@ import java.NativeArray;
 		}
 	}
 
-	public function get( key : K ) : Null<T>
+	public function get( key : K ) : Null<V>
 	{
 		var idx = -1;
 		if (cachedKey == key && ( (idx = cachedIndex) != -1 ))
@@ -280,7 +280,7 @@ import java.NativeArray;
 		return null;
 	}
 
-	private function getDefault( key : K, def : T ) : T
+	private function getDefault( key : K, def : V ) : V
 	{
 		var idx = -1;
 		if (cachedKey == key && ( (idx = cachedIndex) != -1 ))
@@ -379,7 +379,7 @@ import java.NativeArray;
 		Returns an iterator of all values in the hashtable.
 		Implementation detail: Do not set() any new value while iterating, as it may cause a resize, which will break iteration
 	**/
-	public function iterator() : Iterator<T>
+	public function iterator() : Iterator<V>
 	{
 		var i = 0;
 		var len = nBuckets;