home *** CD-ROM | disk | FTP | other *** search
/ FCE Gold Plus / GOLD.iso / pc / fscommand / linux / main.swf / scripts / __Packages / com / util / HashMap.as next >
Encoding:
Text File  |  2007-09-06  |  1.2 KB  |  57 lines

  1. class com.util.HashMap
  2. {
  3.    var arrValues;
  4.    var iLength = 0;
  5.    function HashMap()
  6.    {
  7.       this.arrValues = new Array();
  8.    }
  9.    function put(_strKey, _objValue)
  10.    {
  11.       var _loc1_ = this;
  12.       if(_loc1_.arrValues[_strKey] == undefined)
  13.       {
  14.          _loc1_.iLength = _loc1_.iLength + 1;
  15.       }
  16.       _loc1_.arrValues[_strKey] = _objValue;
  17.    }
  18.    function putValues(_strKey, _objValue)
  19.    {
  20.       if(this.arrValues[_strKey] != undefined)
  21.       {
  22.          this.arrValues[_strKey] += _objValue;
  23.       }
  24.    }
  25.    function ┬ºget┬º(_strKey)
  26.    {
  27.       return this.arrValues[_strKey];
  28.    }
  29.    function deleteKey(_strKey)
  30.    {
  31.       var _loc1_ = this;
  32.       if(_loc1_.arrValues[_strKey] != undefined)
  33.       {
  34.          delete _loc1_.arrValues[_strKey];
  35.          _loc1_.iLength = _loc1_.iLength - 1;
  36.       }
  37.    }
  38.    function getValues()
  39.    {
  40.       return this.arrValues;
  41.    }
  42.    function getKeys()
  43.    {
  44.       var _loc2_ = this;
  45.       var _loc1_ = new Array();
  46.       for(var _loc3_ in _loc2_.arrValues)
  47.       {
  48.          _loc1_.push(_loc3_);
  49.       }
  50.       return _loc1_;
  51.    }
  52.    function getlength()
  53.    {
  54.       return this.iLength;
  55.    }
  56. }
  57.