UNPKG

@enonic/mock-xp

Version:

Mock Enonic XP API JavaScript Library

27 lines (26 loc) 932 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BinaryReference = void 0; var String_1 = require("../../java/String"); var BinaryReference = (function () { function BinaryReference(value) { if (!value) { throw new Error('BinaryReference must not be null or empty'); } this.value = value; } BinaryReference.from = function (value) { return new BinaryReference(value); }; BinaryReference.prototype.equals = function (o) { return this == o || o instanceof BinaryReference && new String_1.JavaString(this.value).equals(o.value); }; BinaryReference.prototype.hashCode = function () { return new String_1.JavaString(this.value).hashCode(); }; BinaryReference.prototype.toString = function () { return this.value; }; return BinaryReference; }()); exports.BinaryReference = BinaryReference;