AVLMapNode.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapNode = exports.AVLMapNode = void 0;
  4. const JavaMapEntry_1 = require("../../../java/util/JavaMapEntry");
  5. const JavaObject_1 = require("../../../java/lang/JavaObject");
  6. const UnsupportedOperationException_1 = require("../../../java/lang/UnsupportedOperationException");
  7. class AVLMapNode extends JavaObject_1.JavaObject {
  8. _key;
  9. _val;
  10. _prev = null;
  11. _next = null;
  12. _childL = null;
  13. _childR = null;
  14. _height = 1;
  15. _size = 1;
  16. /**
  17. * Erstellt ein neues Blatt des Baumes.
  18. */
  19. constructor(key, val) {
  20. super();
  21. this._key = key;
  22. this._val = val;
  23. }
  24. toString() {
  25. return "[" + this._key + ", " + this._val + "]";
  26. }
  27. equals(o) {
  28. if (((o instanceof JavaObject_1.JavaObject) && (o.isTranspiledInstanceOf('java.util.Map.Entry'))) === false)
  29. return false;
  30. let e = (0, JavaMapEntry_1.cast_java_util_Map_Entry)(o);
  31. return JavaObject_1.JavaObject.equalsTranspiler(this._key, (e.getKey())) && (JavaObject_1.JavaObject.equalsTranspiler(this._val, (e.getValue())));
  32. }
  33. hashCode() {
  34. return JavaObject_1.JavaObject.getTranspilerHashCode(this._key) ^ JavaObject_1.JavaObject.getTranspilerHashCode(this._val);
  35. }
  36. getKey() {
  37. return this._key;
  38. }
  39. getValue() {
  40. return this._val;
  41. }
  42. setValue(value) {
  43. throw new UnsupportedOperationException_1.UnsupportedOperationException();
  44. }
  45. isTranspiledInstanceOf(name) {
  46. return ['de.nrw.schule.svws.core.adt.map.AVLMapNode', 'java.util.Map.Entry'].includes(name);
  47. }
  48. }
  49. exports.AVLMapNode = AVLMapNode;
  50. function cast_de_nrw_schule_svws_core_adt_map_AVLMapNode(obj) {
  51. return obj;
  52. }
  53. exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapNode = cast_de_nrw_schule_svws_core_adt_map_AVLMapNode;
  54. //# sourceMappingURL=AVLMapNode.js.map