/*!
 * @author electricessence / https://github.com/electricessence/
 * Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
 */
var __extends=this&&this.__extends||function(t,n){function r(){this.constructor=t}for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)};define(["require","exports","../../Compare","./DictionaryBase"],function(t,n,r,e){"use strict";var o=void 0,u=function(t){function n(){t.apply(this,arguments),this._count=0,this._map={}}return __extends(n,t),n.prototype._getEntry=function(t){return this.containsKey(t)?{key:t,value:this.getValue(t)}:null},n.prototype.containsKey=function(t){return null!==t&&t!==o&&this._count?t in this._map:!1},n.prototype.containsValue=function(t){if(!this._count)return!1;var n=this._map,e=r.areEqual;for(var o in n)if(n.hasOwnProperty(o)&&e(n[o],t))return!0;return!1},n.prototype.getValue=function(t){return null!==t&&t!==o&&this._count?this._map[t]:o},n.prototype.setValue=function(t,n){var r=this,e=r._map,u=e[t];return u!==n?(n===o?t in e&&(delete e[t],--r._count):(t in e||++r._count,e[t]=n),r._onValueUpdate(t,n,u),!0):!1},n.prototype.importMap=function(t){var n=this;return n.handleUpdate(function(){var r=!1;for(var e in t)t.hasOwnProperty(e)&&n.setValue(e,t[e])&&(r=!0);return r})},n.prototype.toMap=function(t){var n=this,r={};if(n._count)for(var e in n._map)if(n._map.hasOwnProperty(e)){var u=n._map[e];t&&(u=t(e,u)),u!==o&&(r[e]=u)}return r},n.prototype.getKeys=function(){var t=this,n=[];if(t._count)for(var r in t._map)t._map.hasOwnProperty(r)&&n.push(r);return n},n.prototype.getValues=function(){var t=this,n=[];if(t._count)for(var r in t._map)t._map.hasOwnProperty(r)&&n.push(t._map[r]);return n},n.prototype.getCount=function(){return this._count},n}(e["default"]);Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=u});
//# sourceMappingURL=StringKeyDictionary.js.map
