Anyways, here it is:
Mbccs.Psp.Web.Manager.Hashtable = function() {
this._hash = new Array();
this._keys = new Array();
this._getEnum = new Array();
this._count = 0;
}
Mbccs.Psp.Web.Manager.Hashtable.prototype = {
getAt : function(index) {
return this._hash[this._getEnum[index]];
},
get : function (key) {
return this._hash[key];
},
remove : function (key) {
for (var i = this._keys.length - 1; i >= 0; i--) {
if (this._keys[i] == key) {
this._keys.splice(i, 1);
this._getEnum.splice(i, 1);
this._hash[key] = null;
this._count = this._keys.length;
}
}
},
put : function (key, value) {
if (value == null)
return null;
if (this._hash[key] == null) {
this._keys[this._keys.length] = key;
this._count = this._keys.length;
this._getEnum[this._count - 1] = key;
}
this._hash[key] = value;
}
}
Mbccs.Psp.Web.Manager.Hashtable.registerClass('Mbccs.Psp.Web.Manager.Hashtable');
if(typeof(Sys) !== 'undefined')
Sys.Application.notifyScriptLoaded();
0 comments:
Post a Comment