123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: hal
- // (C) Copyright IBM Corp. 2003, 2017.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- function C_LruCache(_hJV1){this._hZ92=0;this._hKV1=_hJV1;this._h0A2={};};C_LruCache.prototype.F_GetAllKeys=function(){return U_Object.F_ToArray(this._h0A2);};C_LruCache.prototype.F_GetAllValues=function(){var a=[];for(var _hJ62=this._h1A2;_hJ62;_hJ62=_hJ62._hTP1){a.push(_hJ62.M_oValue);}return a;};C_LruCache.prototype.F_Put=function(_h2D2,_hK52){var _hJ62 ={M_oKey:_h2D2,M_oValue:_hK52};if(this._h0A2[_h2D2]){_hJ62=this._h0A2[_h2D2]; _hJ62.M_oValue=_hK52;this.F_Get(_h2D2);return;}else{this._h0A2[_h2D2]=_hJ62;}if(this._h1A2){this._h1A2._h2A2=_hJ62;_hJ62._hTP1=this._h1A2;}else{this._h3A2=_hJ62;}this._h1A2=_hJ62;if(this._hZ92===this._hKV1){return this._hTI1();}else{this._hZ92++;}};C_LruCache.prototype._hTI1=function(){var _hJ62=this._h3A2;if(_hJ62){if(this._h3A2._h2A2){this._h3A2=this._h3A2._h2A2;this._h3A2._hTP1=undefined;}else{this._h3A2=undefined;this._h1A2=undefined;}_hJ62._h2A2=_hJ62._hTP1=undefined;delete this._h0A2[_hJ62.M_oKey];}return _hJ62;};C_LruCache.prototype.F_Get=function(_h2D2){var _hJ62=this._h0A2[_h2D2];if(!_hJ62){return;}if(_hJ62===this._h1A2){return _hJ62.M_oValue;}if(_hJ62===this._h3A2){this._h3A2=_hJ62._h2A2; }else{_hJ62._hTP1._h2A2=_hJ62._h2A2;}_hJ62._h2A2._hTP1=_hJ62._hTP1;_hJ62._h2A2=undefined;_hJ62._hTP1=this._h1A2;if(this._h1A2){this._h1A2._h2A2=_hJ62;}this._h1A2=_hJ62; return _hJ62.M_oValue;};C_LruCache.prototype.F_Remove=function(_h2D2){var _hJ62=this._h0A2[_h2D2];if(!_hJ62){return;}if(_hJ62==this._h3A2){var _h4A2=this._hTI1();this._hZ92--; return _h4A2.M_oValue;}_hJ62._hTP1._h2A2=_hJ62._h2A2;if(_hJ62===this._h1A2){this._h1A2=_hJ62._hTP1;}else{_hJ62._h2A2._hTP1=_hJ62._hTP1;}delete this._h0A2[_hJ62.M_oKey];this._hZ92--;return _hJ62.M_oValue;};
|