/*!
 * @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,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)};!function(t){if("object"==typeof module&&"object"==typeof module.exports){var e=t(require,exports);void 0!==e&&(module.exports=e)}else"function"==typeof define&&define.amd&&define(["require","exports","../../Compare","./DictionaryBase"],t)}(function(t,e){"use strict";var n=t("../../Compare"),r=t("./DictionaryBase"),o=void 0,i=function(t){function e(){t.apply(this,arguments),this._count=0,this._map={}}return __extends(e,t),e.prototype._getEntry=function(t){return this.containsKey(t)?{key:t,value:this.getValue(t)}:null},e.prototype.containsKey=function(t){return null!==t&&t!==o&&this._count?t in this._map:!1},e.prototype.containsValue=function(t){if(!this._count)return!1;var e=this._map,r=n.areEqual;for(var o in e)if(e.hasOwnProperty(o)&&r(e[o],t))return!0;return!1},e.prototype.getValue=function(t){return null!==t&&t!==o&&this._count?this._map[t]:o},e.prototype.setValue=function(t,e){var n=this,r=n._map,i=r[t];return i!==e?(e===o?t in r&&(delete r[t],--n._count):(t in r||++n._count,r[t]=e),n._onValueUpdate(t,e,i),!0):!1},e.prototype.importMap=function(t){var e=this;return e.handleUpdate(function(){var n=!1;for(var r in t)t.hasOwnProperty(r)&&e.setValue(r,t[r])&&(n=!0);return n})},e.prototype.toMap=function(t){var e=this,n={};if(e._count)for(var r in e._map)if(e._map.hasOwnProperty(r)){var i=e._map[r];t&&(i=t(r,i)),i!==o&&(n[r]=i)}return n},e.prototype.getKeys=function(){var t=this,e=[];if(t._count)for(var n in t._map)t._map.hasOwnProperty(n)&&e.push(n);return e},e.prototype.getValues=function(){var t=this,e=[];if(t._count)for(var n in t._map)t._map.hasOwnProperty(n)&&e.push(t._map[n]);return e},e.prototype.getCount=function(){return this._count},e}(r["default"]);Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=i});
//# sourceMappingURL=StringKeyDictionary.js.map
