"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapNode = exports.AVLMapNode = void 0;
const JavaMapEntry_1 = require("../../../java/util/JavaMapEntry");
const JavaObject_1 = require("../../../java/lang/JavaObject");
const UnsupportedOperationException_1 = require("../../../java/lang/UnsupportedOperationException");
class AVLMapNode extends JavaObject_1.JavaObject {
    _key;
    _val;
    _prev = null;
    _next = null;
    _childL = null;
    _childR = null;
    _height = 1;
    _size = 1;
    /**
     * Erstellt ein neues Blatt des Baumes.
     */
    constructor(key, val) {
        super();
        this._key = key;
        this._val = val;
    }
    toString() {
        return "[" + this._key + ", " + this._val + "]";
    }
    equals(o) {
        if (((o instanceof JavaObject_1.JavaObject) && (o.isTranspiledInstanceOf('java.util.Map.Entry'))) === false)
            return false;
        let e = (0, JavaMapEntry_1.cast_java_util_Map_Entry)(o);
        return JavaObject_1.JavaObject.equalsTranspiler(this._key, (e.getKey())) && (JavaObject_1.JavaObject.equalsTranspiler(this._val, (e.getValue())));
    }
    hashCode() {
        return JavaObject_1.JavaObject.getTranspilerHashCode(this._key) ^ JavaObject_1.JavaObject.getTranspilerHashCode(this._val);
    }
    getKey() {
        return this._key;
    }
    getValue() {
        return this._val;
    }
    setValue(value) {
        throw new UnsupportedOperationException_1.UnsupportedOperationException();
    }
    isTranspiledInstanceOf(name) {
        return ['de.nrw.schule.svws.core.adt.map.AVLMapNode', 'java.util.Map.Entry'].includes(name);
    }
}
exports.AVLMapNode = AVLMapNode;
function cast_de_nrw_schule_svws_core_adt_map_AVLMapNode(obj) {
    return obj;
}
exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapNode = cast_de_nrw_schule_svws_core_adt_map_AVLMapNode;
//# sourceMappingURL=AVLMapNode.js.map