UNPKG

ts-collection

Version:

This is re-write of the java collection classes in typescript. There is some tweak as typescript templates are not as equivalent as Java.

25 lines (24 loc) 657 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var nullpointerexception_1 = require("../lang/nullpointerexception"); var Objects = /** @class */ (function () { function Objects() { } Objects.equals = function (o1, o2) { if (o1 === null) { return o2 === null; } else { var oc1 = o1; return oc1.equals(o2); } }; Objects.requireNonNull = function (obj) { if (obj === null) { throw new nullpointerexception_1.NullPointerException(); } return obj; }; return Objects; }()); exports.Objects = Objects;