export var IReferenceManipulationStrategy;
(function (IReferenceManipulationStrategy) {
    /**
     * @param {string} ref  nullable
     * @param {Node} node nullable
     * @class
     */
    var ReferenceAndNode = /** @class */ (function () {
        function ReferenceAndNode(ref, node) {
            if (this.ref === undefined)
                this.ref = null;
            if (this.node === undefined)
                this.node = null;
            this.ref = ref;
            this.node = node;
        }
        ReferenceAndNode.prototype.getRef = function () {
            return this.ref;
        };
        ReferenceAndNode.prototype.getNode = function () {
            return this.node;
        };
        /**
         *
         * @param {*} o
         * @return {boolean}
         */
        ReferenceAndNode.prototype.equals = function (o) {
            if (this === o)
                return true;
            if (o == null || this.constructor !== o.constructor)
                return false;
            var that = o;
            if (this.ref != null ? !(function (o1, o2) { if (o1 && o1.equals) {
                return o1.equals(o2);
            }
            else {
                return o1 === o2;
            } })(this.ref, that.ref) : that.ref != null)
                return false;
            return this.node != null ? /* equals */ (function (o1, o2) { if (o1 && o1.equals) {
                return o1.equals(o2);
            }
            else {
                return o1 === o2;
            } })(this.node, that.node) : that.node == null;
        };
        /**
         *
         * @return {number}
         */
        ReferenceAndNode.prototype.hashCode = function () {
            var result = this.ref != null ? /* hashCode */ (function (o) { if (o.hashCode) {
                return o.hashCode();
            }
            else {
                return o.toString().split('').reduce(function (prevHash, currVal) { return (((prevHash << 5) - prevHash) + currVal.charCodeAt(0)) | 0; }, 0);
            } })(this.ref) : 0;
            result = 31 * result + (this.node != null ? /* hashCode */ (function (o) { if (o.hashCode) {
                return o.hashCode();
            }
            else {
                return o.toString().split('').reduce(function (prevHash, currVal) { return (((prevHash << 5) - prevHash) + currVal.charCodeAt(0)) | 0; }, 0);
            } })(this.node) : 0);
            return result;
        };
        return ReferenceAndNode;
    }());
    IReferenceManipulationStrategy.ReferenceAndNode = ReferenceAndNode;
    ReferenceAndNode["__class"] = "io.apicurio.datamodels.openapi.visitors.dereference.IReferenceManipulationStrategy.ReferenceAndNode";
})(IReferenceManipulationStrategy || (IReferenceManipulationStrategy = {}));
//# sourceMappingURL=IReferenceManipulationStrategy.js.map