AVLMapSubCollection.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubCollection = exports.AVLMapSubCollection = void 0;
  4. const JavaObject_1 = require("../../../java/lang/JavaObject");
  5. const UnsupportedOperationException_1 = require("../../../java/lang/UnsupportedOperationException");
  6. class AVLMapSubCollection extends JavaObject_1.JavaObject {
  7. _sub;
  8. /**
  9. * Erstellt eine neue Sub-Collection zur übergebenen {@link AVLMapSubMap}.
  10. *
  11. * @param sub Die {@link AVLMapSubMap} auf der diese Sub-Collection operiert.
  12. */
  13. constructor(sub) {
  14. super();
  15. this._sub = sub;
  16. }
  17. toString() {
  18. let s = "";
  19. for (let value of this)
  20. s += (s.length === 0 ? "" : ", ") + value;
  21. return "values = [" + s.valueOf() + "], size = " + this.size() + " --> " + this._sub.toString().valueOf();
  22. }
  23. size() {
  24. return this._sub.size();
  25. }
  26. isEmpty() {
  27. return this._sub.isEmpty();
  28. }
  29. contains(o) {
  30. return this._sub.containsValue(o);
  31. }
  32. iterator() {
  33. return this._sub.bcGetSubCollectionIterator();
  34. }
  35. /**
  36. * Implementation for method overloads of 'toArray'
  37. */
  38. toArray(__param0) {
  39. if ((typeof __param0 === "undefined")) {
  40. return this._sub.bcGetArrayListOfValues().toArray();
  41. }
  42. else if (((typeof __param0 !== "undefined") && Array.isArray(__param0))) {
  43. let a = __param0;
  44. return this._sub.bcGetArrayListOfValues().toArray(a);
  45. }
  46. else
  47. throw new Error('invalid method overload');
  48. }
  49. add(e) {
  50. throw new UnsupportedOperationException_1.UnsupportedOperationException();
  51. }
  52. remove(o) {
  53. throw new UnsupportedOperationException_1.UnsupportedOperationException();
  54. }
  55. containsAll(c) {
  56. return this._sub.bcContainsAllValues(c);
  57. }
  58. addAll(c) {
  59. throw new UnsupportedOperationException_1.UnsupportedOperationException();
  60. }
  61. removeAll(c) {
  62. throw new UnsupportedOperationException_1.UnsupportedOperationException();
  63. }
  64. retainAll(c) {
  65. throw new UnsupportedOperationException_1.UnsupportedOperationException();
  66. }
  67. clear() {
  68. this._sub.clear();
  69. }
  70. isTranspiledInstanceOf(name) {
  71. return ['de.nrw.schule.svws.core.adt.map.AVLMapSubCollection', 'java.util.Collection', 'java.lang.Iterable'].includes(name);
  72. }
  73. [Symbol.iterator]() {
  74. let iter = this.iterator();
  75. const result = {
  76. next() {
  77. if (iter.hasNext())
  78. return { value: iter.next(), done: false };
  79. return { value: null, done: true };
  80. }
  81. };
  82. return result;
  83. }
  84. }
  85. exports.AVLMapSubCollection = AVLMapSubCollection;
  86. function cast_de_nrw_schule_svws_core_adt_map_AVLMapSubCollection(obj) {
  87. return obj;
  88. }
  89. exports.cast_de_nrw_schule_svws_core_adt_map_AVLMapSubCollection = cast_de_nrw_schule_svws_core_adt_map_AVLMapSubCollection;
  90. //# sourceMappingURL=AVLMapSubCollection.js.map