UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

98 lines (97 loc) 3.06 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { Base, markType } from "igniteui-react-core"; /** * @hidden */ var PrimaryKeyValue = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PrimaryKeyValue, _super); function PrimaryKeyValue(a, b) { var _this = _super.call(this) || this; _this.a = null; _this.b = null; _this.a = a; _this.b = b; return _this; } Object.defineProperty(PrimaryKeyValue.prototype, "key", { get: function () { return this.a; }, set: function (a) { this.a = a; }, enumerable: false, configurable: true }); Object.defineProperty(PrimaryKeyValue.prototype, "value", { get: function () { return this.b; }, set: function (a) { this.b = a; }, enumerable: false, configurable: true }); PrimaryKeyValue.createIdentityKey = function (a) { return new PrimaryKeyValue(null, [a]); }; PrimaryKeyValue.prototype.equals = function (a) { var b = a; if (b == null) { return false; } if (b.b == null && this.b == null) { return true; } if (b.b.length != this.b.length) { return false; } if (this.a == null && b.a == null && this.b.length == 1 && b.b.length == 1) { var v1_ = this.b[0]; var v2_ = b.b[0]; return this.f(v1_, v2_); } for (var c = 0; c < this.b.length; c++) { if (!this.f(this.b[c], b.b[c])) { return false; } } return true; }; PrimaryKeyValue.prototype.f = function (a, b) { if (a == null && b == null) { return true; } if (a == null && b != null) { return false; } return Base.equalsStatic(a, b); }; PrimaryKeyValue.prototype.getHashCode = function () { if (this.b == null || this.b.length == 0) { return 0; } var a = 0; a = this.i(this.b[0]); for (var b = 1; b < this.b.length; b++) { a = a * 17 + this.i(this.b[b]); } return a; }; PrimaryKeyValue.prototype.i = function (val_) { if (val_ == null) { return 0; } return Base.getHashCodeStatic(val_); }; PrimaryKeyValue.$t = markType(PrimaryKeyValue, 'PrimaryKeyValue'); return PrimaryKeyValue; }(Base)); export { PrimaryKeyValue };