import { JavaMapEntry, cast_java_util_Map_Entry } from '../../../java/util/JavaMapEntry'; import { JavaObject, cast_java_lang_Object } from '../../../java/lang/JavaObject'; import { JavaString, cast_java_lang_String } from '../../../java/lang/JavaString'; import { UnsupportedOperationException, cast_java_lang_UnsupportedOperationException } from '../../../java/lang/UnsupportedOperationException'; export class AVLMapNode extends JavaObject implements JavaMapEntry { readonly _key : K; _val : V; _prev : AVLMapNode | null = null; _next : AVLMapNode | null = null; _childL : AVLMapNode | null = null; _childR : AVLMapNode | null = null; _height : number = 1; _size : number = 1; /** * Erstellt ein neues Blatt des Baumes. */ constructor(key : K, val : V) { super(); this._key = key; this._val = val; } public toString() : String { return "[" + this._key + ", " + this._val + "]"; } public equals(o : unknown) : boolean { if (((o instanceof JavaObject) && (o.isTranspiledInstanceOf('java.util.Map.Entry'))) === false) return false; let e : JavaMapEntry | null = cast_java_util_Map_Entry(o); return JavaObject.equalsTranspiler(this._key, (e.getKey())) && (JavaObject.equalsTranspiler(this._val, (e.getValue()))); } public hashCode() : number { return JavaObject.getTranspilerHashCode(this._key) ^ JavaObject.getTranspilerHashCode(this._val); } public getKey() : K { return this._key; } public getValue() : V { return this._val; } public setValue(value : V) : V { throw new UnsupportedOperationException() } isTranspiledInstanceOf(name : string): boolean { return ['de.nrw.schule.svws.core.adt.map.AVLMapNode', 'java.util.Map.Entry'].includes(name); } } export function cast_de_nrw_schule_svws_core_adt_map_AVLMapNode(obj : unknown) : AVLMapNode { return obj as AVLMapNode; }