hashMap.eachValue的使用风险

public function getAreaValue():Number
		{
			
			var value	:Number							=	0	;
			var obj		:Object								=	new Object();
			obj.value											=	0;
			obj.buildingValue	=	function( park:AbstractPark ):void
			{
				
				obj.value	+=	park.industryData.areaValue ;
			}
				
			
				
			/*function buildingValue( park:AbstractPark ):void
			{
				trace( this );
				value+=park.industryData.areaValue ;
			}*/
			_parkHashmap.eachValue( obj.buildingValue ) ;
			Debug.trace( "getAreaValue"+obj.value) ;
			return value ;
		}

你可能感兴趣的:(HashMap)