home *** CD-ROM | disk | FTP | other *** search
- class com.util.HashMap
- {
- var arrValues;
- var iLength = 0;
- function HashMap()
- {
- this.arrValues = new Array();
- }
- function put(_strKey, _objValue)
- {
- var _loc1_ = this;
- if(_loc1_.arrValues[_strKey] == undefined)
- {
- _loc1_.iLength = _loc1_.iLength + 1;
- }
- _loc1_.arrValues[_strKey] = _objValue;
- }
- function putValues(_strKey, _objValue)
- {
- if(this.arrValues[_strKey] != undefined)
- {
- this.arrValues[_strKey] += _objValue;
- }
- }
- function §get§(_strKey)
- {
- return this.arrValues[_strKey];
- }
- function deleteKey(_strKey)
- {
- var _loc1_ = this;
- if(_loc1_.arrValues[_strKey] != undefined)
- {
- delete _loc1_.arrValues[_strKey];
- _loc1_.iLength = _loc1_.iLength - 1;
- }
- }
- function getValues()
- {
- return this.arrValues;
- }
- function getKeys()
- {
- var _loc2_ = this;
- var _loc1_ = new Array();
- for(var _loc3_ in _loc2_.arrValues)
- {
- _loc1_.push(_loc3_);
- }
- return _loc1_;
- }
- function getlength()
- {
- return this.iLength;
- }
- }
-